BrazeEx.Api.SCIM (braze_ex v1.0.22)

API calls for all endpoints tagged SCIM.

Link to this section Summary

Functions

Search Existing Dashboard User by Email

Use this endpoint to look up an existing dashboard user account by specifying their email in the filter query parameter.

Remove Dashboard User Account

Use this endpoint to permanently delete an existing dashboard user by specifying the resource id returned by the SCIM <code>POST</code> method.

Look Up an Existing Dashboard User Account

Use this endpoint to look up an existing dashboard user account by specifying the resource id returned by the SCIM <code>POST</code> method.

Update Dashboard User Account

Use this endpoint to update an existing dashboard user account by specifying the resource id returned by the SCIM <code>POST</code> method.

Create New Dashboard User Account

Use this endpoint to create a new dashboard user account by specifying email, given and family names, permissions (for setting permissions at the company, app group, and team level).

Link to this section Functions

Link to this function

scim_v2_users_get(connection, opts \\ [])

@spec scim_v2_users_get(
  Tesla.Env.client(),
  keyword()
) :: {:ok, nil} | {:error, Tesla.Env.t()}

search-existing-dashboard-user-by-email

Search Existing Dashboard User by Email

Use this endpoint to look up an existing dashboard user account by specifying their email in the filter query parameter.

Note that when the query parameter is URL encoded it will read like this:

/scim/v2/Users?filter=userName eq "user@test.com"

prerequisites

Prerequisites

To use this endpoint, you'll need a SCIM token. For more information, refer to Automated user provisioning.

rate-limit

Rate limit

This endpoint has a rate limit of 5000 requests per day, per company. This rate limit is shared with the /scim/v2/Users/ PUT, GET, DELETE, and POST endpoints as documented in API rate limits.

path-parameters

Path parameters

ParameterRequiredData TypeDescription
userName@example.comRequiredStringThe user's email.

request-parameters

Request parameters

There is no request body for this endpoint.

response

Response

Content-Type: application/json
X-Request-Origin: YOUR-REQUEST-ORIGIN-HERE
Authorization: Bearer YOUR-SCIM-TOKEN-HERE
{
  "schemas": ["urn:ietf:params:scim:api:messages:2.0:ListResponse"],
  "totalResults": 1,
  "Resources": [
      {
          "userName": "user@test.com",
          "id": "dfa245b7-24195aec-887bb3ad-602b3340",
          "name": {
              "givenName": "Test",
              "familyName": "User"
          },
          "department": "finance",
          "lastSignInAt": "Thursday, January 1, 1970 12:00:00 AM",
          "permissions": {
              "companyPermissions": ["manage_company_settings"],
              "appGroup": [
                  {
                      "appGroupId": "241adcd25789fabcded",
                      "appGroupName": "Test Workspace",
                      "appGroupPermissions": ["basic_access","send_campaigns_canvases"],
                      "team": [
                          {
                              "teamId": "241adcd25789fabcded",
                              "teamName": "Test Team",                  
                              "teamPermissions": ["admin"]
                          }
                      ]
                  } 
              ]
          }
      }
  ]
}

parameters

Parameters

  • connection (BrazeEx.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :"Content-Type" (String.t):
    • :"X-Request-Origin" (String.t):
    • :Authorization (String.t):
    • :filter (String.t):

returns

Returns

  • {:ok, nil} on success
  • {:error, Tesla.Env.t} on failure
Link to this function

scim_v2_users_id_delete(connection, id, opts \\ [])

@spec scim_v2_users_id_delete(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, nil} | {:error, Tesla.Env.t()}

remove-dashboard-user-account

Remove Dashboard User Account

Use this endpoint to permanently delete an existing dashboard user by specifying the resource id returned by the SCIM <code>POST</code> method.

This is similar to deleting a user in the Manage Users section of the Braze dashboard.

prerequisites

Prerequisites

To use this endpoint, you'll need a SCIM token. For more information, refer to Automated user provisioning.

rate-limit

Rate limit

This endpoint has a rate limit of 5000 requests per day, per company. This rate limit is shared with the /scim/v2/Users/ PUT, GET, and POST endpoints as documented in API rate limits.

path-parameters

Path parameters

ParameterRequiredData typeDescription
idRequiredStringThe user’s resource ID. This parameter is returned by the POST /scim/v2/Users/ or GET /scim/v2/Users?filter=userName eq "[user@test.com](mailto:user@test.com)" methods.

request-parameters

Request parameters

There is no request body for this endpoint.

example-request

Example request

curl --location --request DELETE 'https://rest.iad-01.braze.com/scim/v2/Users/dfa245b7-24195aec-887bb3ad-602b3340' --header 'Content-Type: application/json' --header 'X-Request-Origin: YOUR-REQUEST-ORIGIN-HERE' --header 'Authorization: Bearer YOUR-SCIM-TOKEN-HERE' 

response

Response

example-error-response

Example error response

HTTP/1.1 204 Not Found
Content-Type: text/html; charset=UTF-8

If a developer with this ID doesn’t exist in Braze, the endpoint will respond with:

HTTP/1.1 404 Not Found Content-Type: text/html; charset=UTF-8
{ "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"], "detail": "User not found", "status": 404 }

parameters

Parameters

  • connection (BrazeEx.Connection): Connection to server
  • id (String.t):
  • opts (keyword): Optional parameters
    • :"Content-Type" (String.t):
    • :"X-Request-Origin" (String.t):
    • :Authorization (String.t):

returns

Returns

  • {:ok, nil} on success
  • {:error, Tesla.Env.t} on failure
Link to this function

scim_v2_users_id_get(connection, id, opts \\ [])

@spec scim_v2_users_id_get(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, nil} | {:error, Tesla.Env.t()}

look-up-an-existing-dashboard-user-account

Look Up an Existing Dashboard User Account

Use this endpoint to look up an existing dashboard user account by specifying the resource id returned by the SCIM <code>POST</code> method.

prerequisites

Prerequisites

To use this endpoint, you'll need a SCIM token. For more information, refer to Automated user provisioning.

rate-limit

Rate limit

This endpoint has a rate limit of 5000 requests per day, per company. This rate limit is shared with the /scim/v2/Users/ PUT, GET, DELETE, and POST endpoints as documented in API rate limits.

path-parameters

Path parameters

ParameterRequiredData TypeDescription
idRequiredStringThe user's resource ID. This parameter is returned by the POST /scim/v2/Users/ or GET /scim/v2/Users?filter=userName eq "user@test.com" methods.

request-parameters

Request parameters

There is no request body for this endpoint.

example-request

Example request

curl --location --request GET 'https://rest.iad-01.braze.com/scim/v2/Users/dfa245b7-24195aec-887bb3ad-602b3340' --header 'Content-Type: application/json' --header 'X-Request-Origin: YOUR-REQUEST-ORIGIN-HERE' --header 'Authorization: Bearer YOUR-API-KEY-HERE' 

response

Response

{
  "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
  "id": "dfa245b7-24195aec-887bb3ad-602b3340",
  "userName": "user@test.com",
  "name": {
      "givenName": "Test",
      "familyName": "User"
  },
  "department": "finance",
  "lastSignInAt": "Thursday, January 1, 1970 12:00:00 AM",
  "permissions": {
      "companyPermissions": ["manage_company_settings"],
      "appGroup": [
          {
              "appGroupId": "241adcd25789fabcded",
              "appGroupName": "Test Workspace",
              "appGroupPermissions": ["basic_access","send_campaigns_canvases"],
              "team": [
                  {
                       "teamId": "241adcd25789fabcded",
                       "teamName": "Test Team",                  
                       "teamPermissions": ["admin"]
                  }
              ]
          } 
      ]
  }
}

parameters

Parameters

  • connection (BrazeEx.Connection): Connection to server
  • id (String.t):
  • opts (keyword): Optional parameters
    • :"Content-Type" (String.t):
    • :"X-Request-Origin" (String.t):
    • :Authorization (String.t):

returns

Returns

  • {:ok, nil} on success
  • {:error, Tesla.Env.t} on failure
Link to this function

scim_v2_users_id_put(connection, id, opts \\ [])

@spec scim_v2_users_id_put(Tesla.Env.client(), String.t(), keyword()) ::
  {:ok, nil} | {:error, Tesla.Env.t()}

update-dashboard-user-account

Update Dashboard User Account

Use this endpoint to update an existing dashboard user account by specifying the resource id returned by the SCIM <code>POST</code> method.

It allows you to update of given and family names, permissions (for setting permissions at the company, app group, and team level) and department.

For security reasons, userName (email address) cannot be updated through this endpoint. If you would like to change the userName (email address) for a user, contact Support.

prerequisites

Prerequisites

To use this endpoint, you'll need a SCIM token. For more information, refer to Automated user provisioning.

rate-limit

Rate limit

This endpoint has a rate limit of 5000 requests per day, per company. This rate limit is shared with the /scim/v2/Users/ GET, DELETE, and POST endpoints as documented in API rate limits.

path-parameters

Path parameters

ParameterRequiredData TypeDescription
idRequiredStringThe user's resource ID. This parameter is returned by the POST /scim/v2/Users/ or GET /scim/v2/Users?filter=userName eq "user@test.com" methods.

request-parameters

Request parameters

ParameterRequiredData typeDescription
schemasRequiredArray of stringsExpected SCIM 2.0 schema name for user object.
nameRequiredJSON objectThis object contains the user's given name and family name.
departmentRequiredStringValid department string from the department string documentation.
permissionsRequiredJSON objectPermissions object as described in the permissions object documentation.

response

Response

{
  "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
  "id": "dfa245b7-24195aec-887bb3ad-602b3340",
  "userName": "user@test.com",
  "name": {
      "givenName": "Test",
      "familyName": "User"
  },
  "department": "finance",
  "lastSignInAt": "Thursday, January 1, 1970 12:00:00 AM",
  "permissions": {
      "companyPermissions": ["manage_company_settings"],
      "appGroup": [
          {
              "appGroupId": "241adcd25789fabcded",
              "appGroupName": "Test App Group",
              "appGroupPermissions": ["basic_access","send_campaigns_canvases"],
              "team": [
                  {
                       "teamId": "2519dafcdba238ae7",
                       "teamName": "Test Team",                  
                       "teamPermissions": ["admin"]
                  }
              ]
          } 
      ]
  }
}

error-states

Error states

If a user with this ID doesn’t exist in Braze, the endpoint will respond with:

HTTP/1.1 404 Not Found
Content-Type: text/html; charset=UTF-8
{
  "schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
  "detail": "User not found",
  "status": 404
}

parameters

Parameters

  • connection (BrazeEx.Connection): Connection to server
  • id (String.t):
  • opts (keyword): Optional parameters
    • :"Content-Type" (String.t):
    • :"X-Request-Origin" (String.t):
    • :Authorization (String.t):
    • :body (String.t):

returns

Returns

  • {:ok, nil} on success
  • {:error, Tesla.Env.t} on failure
Link to this function

scim_v2_users_post(connection, opts \\ [])

@spec scim_v2_users_post(
  Tesla.Env.client(),
  keyword()
) :: {:ok, nil} | {:error, Tesla.Env.t()}

create-new-dashboard-user-account

Create New Dashboard User Account

Use this endpoint to create a new dashboard user account by specifying email, given and family names, permissions (for setting permissions at the company, app group, and team level).

prerequisites

Prerequisites

To use this endpoint, you'll need a SCIM token. For more information, refer to Automated user provisioning.

rate-limit

Rate limit

This endpoint has a rate limit of 5000 requests per day, per company. This rate limit is shared with the /scim/v2/Users/ PUT, GET, and DELETE endpoints as documented in API rate limits.

request-parameters

Request parameters

ParameterRequiredData typeDescription
schemasRequiredArray of stringsExpected SCIM 2.0 schema name for user object.
userNameRequiredStringThe user’s email address.
nameRequiredJSON objectThis object contains the user's given name and family name.
departmentRequiredStringValid department string from the department string documentation.
permissionsRequiredJSON objectPermissions object as described in the permissions object documentation.

response

Response

{
  "schemas": ["urn:ietf:params:scim:schemas:core:2.0:User"],
  "id": "dfa245b7-24195aec-887bb3ad-602b3340",
  "userName": "user@test.com",
  "name": {
      "givenName": "Test",
      "familyName": "User"
  },
  "department": "finance",
  "lastSignInAt": "Thursday, January 1, 1970 12:00:00 AM",
  "permissions": {
      "companyPermissions": ["manage_company_settings"],
      "appGroup": [
          {
              "appGroupId": "241adcd25789fabcded",
              "appGroupName": "Test App Group",
              "appGroupPermissions": ["basic_access","send_campaigns_canvases"],
              "team": [
                  {
                       "teamId": "2519dafcdba238ae7",
                       "teamName": "Test Team",                  
                       "teamPermissions": ["basic_access","export_user_data"]
                  }
              ]
          } 
      ]
  }
}

error-states

Error states

If a user with this email address already exists in Braze, the endpoint will respond with:

HTTP/1.1 409 Conflict
Date: Tue, 10 Sep 2019 02:22:30 GMT
Content-Type: text/json;charset=UTF-8
{
"schemas": ["urn:ietf:params:scim:api:messages:2.0:Error"],
"detail": "User already exists in the database.",
"status": 409
}

parameters

Parameters

  • connection (BrazeEx.Connection): Connection to server
  • opts (keyword): Optional parameters
    • :"Content-Type" (String.t):
    • :"X-Request-Origin" (String.t):
    • :Authorization (String.t):
    • :body (String.t):

returns

Returns

  • {:ok, nil} on success
  • {:error, Tesla.Env.t} on failure