Create SCIM User

POST /Organizations/{OrganizationSid}/scim/Users

Path parameters

  • OrganizationSid string(OrganizationSid) Required

    Format should match the following pattern: OR[0-9a-f]{32}.

Body Required

  • id string

    Unique Twilio user sid

  • externalId string

    External unique resource id defined by provisioning client

    Minimum length is 2, maximum length is 255.

  • userName string Required

    Unique username, MUST be same as primary email address

    Minimum length is 2, maximum length is 255.

  • displayName string

    User friendly display name

    Minimum length is 0, maximum length is 255.

  • name object

    User's name

    Hide name attributes Show name attributes object
    • givenName string

      The user's first or given name

      Minimum length is 0, maximum length is 255.

    • familyName string

      The user's last or family name

      Minimum length is 0, maximum length is 255.

  • emails array[object]

    Email address list of the user. Primary email must be defined if there are more than 1 email. Primary email must match the username.

    Email address list of the user. Primary email must be defined if there are more than 1 email. Primary email must match the username.

    At least 1 but not more than 2147483647 elements.

    Hide emails attributes Show emails attributes object
    • primary boolean

      Indicates if this email address is the primary one

    • value string

      The actual email address value

      Minimum length is 2, maximum length is 160.

    • type string

      The type of email address (e.g., work, home, etc.)

      Minimum length is 0, maximum length is 64.

  • active boolean

    Indicates whether the user is active

  • locale string

    User's locale

  • timezone string

    User's time zone

  • schemas array[string]

    An array of URIs that indicate the schemas supported for this user resource

  • meta object

    Meta

    Hide meta attributes Show meta attributes object
    • resourceType string

      Indicates the type of the resource

    • created string(date-time)

      The date and time when the resource was created in the system

    • lastModified string(date-time)

      The date and time when the resource was last modified

    • version string

      A version identifier for the resource. This can be used to manage resource versioning and concurrency control.

Body Required

  • id string

    Unique Twilio user sid

  • externalId string

    External unique resource id defined by provisioning client

    Minimum length is 2, maximum length is 255.

  • userName string Required

    Unique username, MUST be same as primary email address

    Minimum length is 2, maximum length is 255.

  • displayName string

    User friendly display name

    Minimum length is 0, maximum length is 255.

  • name object

    User's name

    Hide name attributes Show name attributes object
    • givenName string

      The user's first or given name

      Minimum length is 0, maximum length is 255.

    • familyName string

      The user's last or family name

      Minimum length is 0, maximum length is 255.

  • emails array[object]

    Email address list of the user. Primary email must be defined if there are more than 1 email. Primary email must match the username.

    Email address list of the user. Primary email must be defined if there are more than 1 email. Primary email must match the username.

    At least 1 but not more than 2147483647 elements.

    Hide emails attributes Show emails attributes object
    • primary boolean

      Indicates if this email address is the primary one

    • value string

      The actual email address value

      Minimum length is 2, maximum length is 160.

    • type string

      The type of email address (e.g., work, home, etc.)

      Minimum length is 0, maximum length is 64.

  • active boolean

    Indicates whether the user is active

  • locale string

    User's locale

  • timezone string

    User's time zone

  • schemas array[string]

    An array of URIs that indicate the schemas supported for this user resource

  • meta object

    Meta

    Hide meta attributes Show meta attributes object
    • resourceType string

      Indicates the type of the resource

    • created string(date-time)

      The date and time when the resource was created in the system

    • lastModified string(date-time)

      The date and time when the resource was last modified

    • version string

      A version identifier for the resource. This can be used to manage resource versioning and concurrency control.

Responses

  • 201 application/scim+json

    Created User

    Hide headers attributes Show headers attributes
    • Access-Control-Allow-Origin string

      Specify the origin(s) allowed to access the resource

    • Access-Control-Allow-Methods string

      Specify the HTTP methods allowed when accessing the resource

    • Access-Control-Allow-Headers string

      Specify the headers allowed when accessing the resource

    • Access-Control-Allow-Credentials boolean

      Indicates whether the browser should include credentials

    • Access-Control-Expose-Headers string

      Headers exposed to the client

    Hide response attributes Show response attributes object
    • id string

      Unique Twilio user sid

    • externalId string

      External unique resource id defined by provisioning client

      Minimum length is 2, maximum length is 255.

    • userName string Required

      Unique username, MUST be same as primary email address

      Minimum length is 2, maximum length is 255.

    • displayName string

      User friendly display name

      Minimum length is 0, maximum length is 255.

    • name object

      User's name

      Hide name attributes Show name attributes object
      • givenName string

        The user's first or given name

        Minimum length is 0, maximum length is 255.

      • familyName string

        The user's last or family name

        Minimum length is 0, maximum length is 255.

    • emails array[object]

      Email address list of the user. Primary email must be defined if there are more than 1 email. Primary email must match the username.

      Email address list of the user. Primary email must be defined if there are more than 1 email. Primary email must match the username.

      At least 1 but not more than 2147483647 elements.

      Hide emails attributes Show emails attributes object
      • primary boolean

        Indicates if this email address is the primary one

      • value string

        The actual email address value

        Minimum length is 2, maximum length is 160.

      • type string

        The type of email address (e.g., work, home, etc.)

        Minimum length is 0, maximum length is 64.

    • active boolean

      Indicates whether the user is active

    • locale string

      User's locale

    • timezone string

      User's time zone

    • schemas array[string]

      An array of URIs that indicate the schemas supported for this user resource

    • meta object

      Meta

      Hide meta attributes Show meta attributes object
      • resourceType string

        Indicates the type of the resource

      • created string(date-time)

        The date and time when the resource was created in the system

      • lastModified string(date-time)

        The date and time when the resource was last modified

      • version string

        A version identifier for the resource. This can be used to manage resource versioning and concurrency control.

  • 400 application/scim+json

    Bad request or business rules violation

    Hide headers attributes Show headers attributes
    • Access-Control-Allow-Origin string

      Specify the origin(s) allowed to access the resource

    • Access-Control-Allow-Methods string

      Specify the HTTP methods allowed when accessing the resource

    • Access-Control-Allow-Headers string

      Specify the headers allowed when accessing the resource

    • Access-Control-Allow-Credentials boolean

      Indicates whether the browser should include credentials

    • Access-Control-Expose-Headers string

      Headers exposed to the client

    Hide response attributes Show response attributes object
    • schemas array[string]

      Schema URIs that define the contents of the error structure

    • detail string

      A human-readable description of the error

    • scimType string

      A scimType error code as defined in RFC7644

      Values are invalidFilter, uniqueness, mutability, invalidValue, or invalidSyntax.

    • status string

      Http status code

    • code integer(int32)

      Twilio-specific error code

    • moreInfo string

      Link to Error Code References

  • 401 application/scim+json

    Unauthorized

    Hide headers attributes Show headers attributes
    • Access-Control-Allow-Origin string

      Specify the origin(s) allowed to access the resource

    • Access-Control-Allow-Methods string

      Specify the HTTP methods allowed when accessing the resource

    • Access-Control-Allow-Headers string

      Specify the headers allowed when accessing the resource

    • Access-Control-Allow-Credentials boolean

      Indicates whether the browser should include credentials

    • Access-Control-Expose-Headers string

      Headers exposed to the client

    Hide response attributes Show response attributes object
    • schemas array[string]

      Schema URIs that define the contents of the error structure

    • detail string

      A human-readable description of the error

    • scimType string

      A scimType error code as defined in RFC7644

      Values are invalidFilter, uniqueness, mutability, invalidValue, or invalidSyntax.

    • status string

      Http status code

    • code integer(int32)

      Twilio-specific error code

    • moreInfo string

      Link to Error Code References

  • 403 application/scim+json

    Forbidden

    Hide headers attributes Show headers attributes
    • Access-Control-Allow-Origin string

      Specify the origin(s) allowed to access the resource

    • Access-Control-Allow-Methods string

      Specify the HTTP methods allowed when accessing the resource

    • Access-Control-Allow-Headers string

      Specify the headers allowed when accessing the resource

    • Access-Control-Allow-Credentials boolean

      Indicates whether the browser should include credentials

    • Access-Control-Expose-Headers string

      Headers exposed to the client

    Hide response attributes Show response attributes object
    • schemas array[string]

      Schema URIs that define the contents of the error structure

    • detail string

      A human-readable description of the error

    • scimType string

      A scimType error code as defined in RFC7644

      Values are invalidFilter, uniqueness, mutability, invalidValue, or invalidSyntax.

    • status string

      Http status code

    • code integer(int32)

      Twilio-specific error code

    • moreInfo string

      Link to Error Code References

  • 404 application/scim+json

    Not found

    Hide headers attributes Show headers attributes
    • Access-Control-Allow-Origin string

      Specify the origin(s) allowed to access the resource

    • Access-Control-Allow-Methods string

      Specify the HTTP methods allowed when accessing the resource

    • Access-Control-Allow-Headers string

      Specify the headers allowed when accessing the resource

    • Access-Control-Allow-Credentials boolean

      Indicates whether the browser should include credentials

    • Access-Control-Expose-Headers string

      Headers exposed to the client

    Hide response attributes Show response attributes object
    • schemas array[string]

      Schema URIs that define the contents of the error structure

    • detail string

      A human-readable description of the error

    • scimType string

      A scimType error code as defined in RFC7644

      Values are invalidFilter, uniqueness, mutability, invalidValue, or invalidSyntax.

    • status string

      Http status code

    • code integer(int32)

      Twilio-specific error code

    • moreInfo string

      Link to Error Code References

  • 429 application/scim+json

    Too many requests

    Hide headers attributes Show headers attributes
    • Access-Control-Allow-Origin string

      Specify the origin(s) allowed to access the resource

    • Access-Control-Allow-Methods string

      Specify the HTTP methods allowed when accessing the resource

    • Access-Control-Allow-Headers string

      Specify the headers allowed when accessing the resource

    • Access-Control-Allow-Credentials boolean

      Indicates whether the browser should include credentials

    • Access-Control-Expose-Headers string

      Headers exposed to the client

    Hide response attributes Show response attributes object
    • schemas array[string]

      Schema URIs that define the contents of the error structure

    • detail string

      A human-readable description of the error

    • scimType string

      A scimType error code as defined in RFC7644

      Values are invalidFilter, uniqueness, mutability, invalidValue, or invalidSyntax.

    • status string

      Http status code

    • code integer(int32)

      Twilio-specific error code

    • moreInfo string

      Link to Error Code References

POST /Organizations/{OrganizationSid}/scim/Users
curl \
 --request POST 'https://preview-iam.twilio.com/Organizations/ORceef74a747c1ae8d837aafb5a31e475f/scim/Users' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"id":"string","externalId":"string","userName":"string","displayName":"string","name":{"givenName":"string","familyName":"string"},"emails":[{"primary":true,"value":"string","type":"string"}],"active":true,"locale":"string","timezone":"string","schemas":["string"],"meta":{"resourceType":"string","created":"2025-05-04T09:42:00Z","lastModified":"2025-05-04T09:42:00Z","version":"string"}}'
curl \
 --request POST 'https://preview-iam.twilio.com/Organizations/ORceef74a747c1ae8d837aafb5a31e475f/scim/Users' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/scim+json"
Request examples
{
  "id": "string",
  "externalId": "string",
  "userName": "string",
  "displayName": "string",
  "name": {
    "givenName": "string",
    "familyName": "string"
  },
  "emails": [
    {
      "primary": true,
      "value": "string",
      "type": "string"
    }
  ],
  "active": true,
  "locale": "string",
  "timezone": "string",
  "schemas": [
    "string"
  ],
  "meta": {
    "resourceType": "string",
    "created": "2025-05-04T09:42:00Z",
    "lastModified": "2025-05-04T09:42:00Z",
    "version": "string"
  }
}
Request examples
{
  "id": "string",
  "externalId": "string",
  "userName": "string",
  "displayName": "string",
  "name": {
    "givenName": "string",
    "familyName": "string"
  },
  "emails": [
    {
      "primary": true,
      "value": "string",
      "type": "string"
    }
  ],
  "active": true,
  "locale": "string",
  "timezone": "string",
  "schemas": [
    "string"
  ],
  "meta": {
    "resourceType": "string",
    "created": "2025-05-04T09:42:00Z",
    "lastModified": "2025-05-04T09:42:00Z",
    "version": "string"
  }
}
Response examples (201)
# Headers
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: POST, OPTIONS
Access-Control-Allow-Headers: Content-Type, Authorization
Access-Control-Allow-Credentials: true
Access-Control-Expose-Headers: X-Custom-Header1, X-Custom-Header2

# Payload
{
  "id": "string",
  "externalId": "string",
  "userName": "string",
  "displayName": "string",
  "name": {
    "givenName": "string",
    "familyName": "string"
  },
  "emails": [
    {
      "primary": true,
      "value": "string",
      "type": "string"
    }
  ],
  "active": true,
  "locale": "string",
  "timezone": "string",
  "schemas": [
    "string"
  ],
  "meta": {
    "resourceType": "string",
    "created": "2025-05-04T09:42:00Z",
    "lastModified": "2025-05-04T09:42:00Z",
    "version": "string"
  }
}
Response examples (400)
# Headers
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: POST, OPTIONS
Access-Control-Allow-Headers: Content-Type, Authorization
Access-Control-Allow-Credentials: true
Access-Control-Expose-Headers: X-Custom-Header1, X-Custom-Header2

# Payload
{
  "schemas": [
    "string"
  ],
  "detail": "string",
  "scimType": "invalidFilter",
  "status": "string",
  "code": 42,
  "moreInfo": "string"
}
Response examples (401)
# Headers
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: POST, OPTIONS
Access-Control-Allow-Headers: Content-Type, Authorization
Access-Control-Allow-Credentials: true
Access-Control-Expose-Headers: X-Custom-Header1, X-Custom-Header2

# Payload
{
  "schemas": [
    "string"
  ],
  "detail": "string",
  "scimType": "invalidFilter",
  "status": "string",
  "code": 42,
  "moreInfo": "string"
}
Response examples (403)
# Headers
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: POST, OPTIONS
Access-Control-Allow-Headers: Content-Type, Authorization
Access-Control-Allow-Credentials: true
Access-Control-Expose-Headers: X-Custom-Header1, X-Custom-Header2

# Payload
{
  "schemas": [
    "string"
  ],
  "detail": "string",
  "scimType": "invalidFilter",
  "status": "string",
  "code": 42,
  "moreInfo": "string"
}
Response examples (404)
# Headers
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: POST, OPTIONS
Access-Control-Allow-Headers: Content-Type, Authorization
Access-Control-Allow-Credentials: true
Access-Control-Expose-Headers: X-Custom-Header1, X-Custom-Header2

# Payload
{
  "schemas": [
    "string"
  ],
  "detail": "string",
  "scimType": "invalidFilter",
  "status": "string",
  "code": 42,
  "moreInfo": "string"
}
Response examples (429)
# Headers
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: POST, OPTIONS
Access-Control-Allow-Headers: Content-Type, Authorization
Access-Control-Allow-Credentials: true
Access-Control-Expose-Headers: X-Custom-Header1, X-Custom-Header2

# Payload
{
  "schemas": [
    "string"
  ],
  "detail": "string",
  "scimType": "invalidFilter",
  "status": "string",
  "code": 42,
  "moreInfo": "string"
}