List users

Allows to recover all users

HTTP request

GET

GET https://api.sarbacane.com/v1/teams/{teamId}

Header parameters

Parameter Description Required
accountID Account ID yes
apiKey API key yes

URL parameters

Parameter Description Required
offset Start position false
limit Maximum number of returned elements - Max: 100 000 false
search Filter users by name or email false
desc Descendant sorting by users creation date - Possible values : true or false false

Errors

HTML Code Error message Description
401 NEED_ACCOUNT_ID No account ID is specified in the request
401 NEED_API_KEY No API key is specified in the request
400 API_KEY_UNAUTHORIZED Invalid API key
404 SERVICE_*_UNREACHABLE The requested service is unavailable
500 INTERNAL_SERVER_ERROR Internal error, please contact support

Invite a user

Invite a user to your account

HTTP request

POST

POST https://api.sarbacane.com/v1/users/invite

Header parameters

Parameter Description Required
accountID Account ID yes
apiKey API key yes

Body Parameters

Parameter Description Required
firstname User firstname yes
lastname User lastname yes
email User email yes
role User role, possible values : "USER" or "ADMIN" yes
teamId Team id to link with the user (only if role is "USER") no

Errors

HTML Code Error message Description
401 NEED_ACCOUNT_ID No account ID is specified in the request
401 NEED_API_KEY No API key is specified in the request
400 API_KEY_UNAUTHORIZED Invalid API key
404 SERVICE_*_UNREACHABLE The requested service is unavailable
500 INTERNAL_SERVER_ERROR Internal error, please contact support

Delete users or invitations

Delete users or invitations linked to your account

HTTP request

DELETE

DELETE https://api.sarbacane.com/v1/users

Header parameters

Parameter Description Required
accountID Account ID yes
apiKey API key yes

Body Parameters

Parameter Description Required
invitations Array containing invited emails to delete no
userIds Array containing user ids to delete no

Errors

HTML Code Error message Description
401 NEED_ACCOUNT_ID No account ID is specified in the request
401 NEED_API_KEY No API key is specified in the request
400 API_KEY_UNAUTHORIZED Invalid API key
404 SERVICE_*_UNREACHABLE The requested service is unavailable
500 INTERNAL_SERVER_ERROR Internal error, please contact support

Update user rights

Update user rights.

HTTP request

PUT

PUT https://api.sarbacane.com/v1/users/{userId}/rights

Header parameters

Parameter Description Required
accountID Account ID yes
apiKey API key yes

Body Parameters

Parameter Description Required
send_campaigns Right to send campaigns false
export_contacts Right to export contacts false
teams_visibility Right to share resources to other teams of the same account false
send_tests Right to send tests false
transfer_templates Right to transfer templates to other accounts false

URL parameters

Parameter Description Required
userId User id yes

Errors

HTML Code Error message Description
400 USER_IS_ADMIN Unable to update admin rights
400 INVALID_BODY Invalid body
401 NEED_ACCOUNT_ID No account ID is specified in the request
401 NEED_API_KEY No API key is specified in the request
400 API_KEY_UNAUTHORIZED Invalid API key
404 USER_NOT_FOUND User doesn't exist
500 INTERNAL_SERVER_ERROR Internal error, please contact support

Get user rights

Get all user rights

HTTP request

GET

GET https://api.sarbacane.com/v1/users/{userId}/rights

Header parameters

Parameter Description Required
accountID Account ID yes
apiKey API key yes

URL parameters

Parameter Description Required
userId User id yes

Errors

HTML Code Error message Description
401 NEED_ACCOUNT_ID No account ID is specified in the request
401 NEED_API_KEY No API key is specified in the request
400 API_KEY_UNAUTHORIZED Invalid API key
404 SERVICE_*_UNREACHABLE The requested service is unavailable
500 INTERNAL_SERVER_ERROR Internal error, please contact support

Update a user

Update a user role or team

HTTP request

PUT

PUT https://api.sarbacane.com/v1/users/{userId}/role

Header parameters

Parameter Description Required
accountID Account ID yes
apiKey API key yes

Body Parameters

Parameter Description Required
role User role, possible values : "USER" or "ADMIN" yes
teamId Team id to link with the user (only if role is "USER") no

URL parameters

Parameter Description Required
userId User id yes

Errors

HTML Code Error message Description
401 NEED_ACCOUNT_ID No account ID is specified in the request
401 NEED_API_KEY No API key is specified in the request
400 API_KEY_UNAUTHORIZED Invalid API key
404 SERVICE_*_UNREACHABLE The requested service is unavailable
500 INTERNAL_SERVER_ERROR Internal error, please contact support

Get a team

Get a team

HTTP request

GET

GET https://api.sarbacane.com/v1/teams/{teamId}

Header parameters

Parameter Description Required
accountID Account ID yes
apiKey API key yes

URL parameters

Parameter Description Required
teamID Team id yes

Errors

HTML Code Error message Description
401 NEED_ACCOUNT_ID No account ID is specified in the request
401 NEED_API_KEY No API key is specified in the request
400 API_KEY_UNAUTHORIZED Invalid API key
404 SERVICE_*_UNREACHABLE The requested service is unavailable
500 INTERNAL_SERVER_ERROR Internal error, please contact support

Create a team

Create a new team related to your account

HTTP request

POST

POST https://api.sarbacane.com/v1/teams

Header parameters

Parameter Description Required
accountID Account ID yes
apiKey API key yes

Body Parameters

Parameter Description Required
name Team name yes

Errors

HTML Code Error message Description
401 NEED_ACCOUNT_ID No account ID is specified in the request
401 NEED_API_KEY No API key is specified in the request
401 API_KEY_UNAUTHORIZED Invalid API key
404 SERVICE_*_UNREACHABLE The requested service is unavailable
500 INTERNAL_SERVER_ERROR Internal error, please contact support

List teams

Get all teams linked to your account

HTTP request

GET

GET https://api.sarbacane.com.com/v1/teams

Header parameters

Parameter Description Required
accountID Account id yes
apiKey API key yes

URL parameters

Parameter Description Required
offset Start position false
limit Maximum number of returned elements - Max: 100 000 false
search Filter teams by name false
desc Descendant sorting by teams creation date - Possible values : true or false false

Errors

HTML Code Error message Description
401 NEED_ACCOUNT_ID No account ID is specified in the request
401 NEED_API_KEY No API key is specified in the request
401 API_KEY_UNAUTHORIZED Invalid API key
404 SERVICE_*_UNREACHABLE The requested service is unavailable
500 INTERNAL_SERVER_ERROR Internal error, please contact support

Update team users

Update team users.

HTTP request

PUT

PUT https://api.sarbacane.com/v1/teams/{teamId}/users/team

Header parameters

Parameter Description Required
accountId Account id Yes
apiKey API key yes

Body Parameters

Parameter Description Required
userIds Array containing user ids yes

URL parameters

Parameter Description Required
teamId Team id yes

Errors

HTML Code Error message Description
401 NEED_ACCOUNT_ID No account ID is specified in the request
400 NEED_API_KEY No API key is specified in the request
401 API_KEY_UNAUTHORIZED Invalid API key
404 SERVICE_*_UNREACHABLE The requested service is unavailable
500 INTERNAL_SERVER_ERROR Internal error, please contact support

Update team name

Update team name.

HTTP request

PUT

PUT https://api.sarbacane.com/v1/teams/{teamId}

Header parameters

Parameter Description Required
accountID Account ID yes
apiKey API key yes

Body Parameters

Parameter Description Required
name Team name yes

URL parameters

Parameter Description Required
teamID Team id yes

Errors

HTML Code Error message Description
401 NEED_ACCOUNT_ID No account ID is specified in the request
401 NEED_API_KEY No API key is specified in the request
401 API_KEY_UNAUTHORIZED Invalid API key
404 SERVICE_*_UNREACHABLE The requested service is unavailable
500 INTERNAL_SERVER_ERROR Internal error, please contact support

Delete a team

Delete a team.

HTTP request

DELETE

DELETE https://api.sarbacane.com/v1/teams/{teamId}

Header parameters

Parameter Description Required
accountID Account id yes
apiKEY API key yes

URL parameters

Parameter Description Required
teamId Team id yes

Errors

HTML Code Error message Description
401 NEED_ACCOUNT_ID No account ID is specified in the request
401 NEED_API_KEY No API key is specified in the request
401 API_KEY_UNAUTHORIZED Invalid API key
404 SERVICE_*_UNREACHABLE The requested service is unavailable
500 INTERNAL_SERVER_ERROR Internal error, please contact support

Update team invitations

Update team invitations.

HTTP request

PUT

PUT https://api.sarbacane.com/v1/teams/{teamId}/invitations/team

Header parameters

Parameter Description Required
accountId Account id yes
apiKey Team id yes

Body Parameters

Parameter Description Required
invitations Array containing email addresses to send invitation yes

URL parameters

Parameter Description Required
teamId Team id yes

Errors

HTML Code Error message Description
401 NEED_ACCOUNT_ID No account ID is specified in the request
401 NEED_API_KEY No API key is specified in the request
401 API_KEY_UNAUTHORIZED Invalid API key
404 SERVICE_*_UNREACHABLE The requested service is unavailable
500 INTERNAL_SERVER_ERROR Internal error, please contact support

Get credits limits

Get credits limits

HTTP request

GET

GET https://api.sarbacane.com/v1/teams/{teamId}/creditLimits

Header parameters

Parameter Description Required
accountID Account id yes
apiKey API key yes

URL parameters

Parameter Description Required
teamId Team id yes

Errors

HTML Code Error message Description
401 NEED_ACCOUNT_ID No account ID is specified in the request
401 NEED_API_KEY No API key is specified in the request
401 API_KEY_UNAUTHORIZED Invalid API key
404 SERVICE_*_UNREACHABLE The requested service is unavailable
500 INTERNAL_SERVER_ERROR Internal error, please contact support

Update credits limits

Update credits limits of a team.

HTTP request

PUT

PUT https://api.sarbacane.com/v1/teams/{teamId}/creditLimits

Header parameters

Parameter Description Required
accountId Account id yes
apiKey API key yes

Body Parameters

Parameter Description Required
creditLimits Array containing Json data as credit limit. The Json parameters "creditType", "count" and "period" are explained below true
creditType Parameter of a Json item from creditLimits array, credit type, possible values : "EMAIL" or "SMS" true
count Parameter of a Json item from creditLimits array, numerical value as credit limit true
period Parameter of a Json item from creditLimits array, limit period, possible values : "MONTH" or "YEAR" true

URL parameters

Parameter Description Required
teamId Team id yes

Errors

HTML Code Error message Description
401 NEED_ACCOUNT_ID No account ID is specified in the request
401 NEED_API_KEY No API key is specified in the request
401 API_KEY_UNAUTHORIZED Invalid API key
404 SERVICE_*_UNREACHABLE The requested service is unavailable
500 INTERNAL_SERVER_ERROR Internal error, please contact support

Delete credits limits

Delete all credits limits of a team.

HTTP request

DELETE

DELETE https://api.sarbacane.com/v1/teams/{teamId}/creditLimits

Header parameters

Parameter Description Required
accountID Account id yes
apiKey API key yes

URL parameters

Parameter Description Required
teamId Team id yes

Errors

HTML Code Error message Description
401 NEED_ACCOUNT_ID No account ID is specified in the request
401 NEED_API_KEY No API key is specified in the request
401 API_KEY_UNAUTHORIZED Invalid API key
404 SERVICE_*_UNREACHABLE The requested service is unavailable
500 INTERNAL_SERVER_ERROR Internal error, please contact support

List credit use

List users or teams credit use

HTTP request

POST

POST https://sarbacaneapis.com/v1/settings/transactions/search

Header parameters

Parameter Description Required
accountID Accound id yes
apiKey API Key yes

Body Parameters

Parameter Description Required
sort Json containing "orderBy" and "asc" parameters explained below yes
sort.orderBy Credit use order, possible values : "TRANSACTION_DATE", "USER_NAME", "TEAM_NAME" and "CREDITS" yes
sort.asc Ascendant or descendant sorting, possible values : true or false yes
filter Json containing "minDate", "maxDate", "range", "search", "users", "teamIds", "includeTags" and "excludeTags" parameters explained below yes
filter.minDate Start date filter (Date ISO: 2019-04-25T08:31:43.280Z) yes
filter.maxDate End date filter (Date ISO: 2019-04-25T08:31:43.280Z) yes
filter.range Json containing "origin" and "length" parameters explained below yes
filter.range.origin First item index - Min: 0 yes
filter.range.length Maximum number of returned elements - Max: 10 000 yes
filter.users Array containing user ids, the search is done by users or but teamsIds, one of those is required yes
filter.teamIds Array containing team ids, the search is done by users or but teamsIds, one of those is required yes
filter.includeTags Array containing tags to include in the search, possible values : "EMAIL", "SMS", "TRANSACTIONAL" (Automatic campaigns and "TEST". A tag must not be included and excluded at the same time. Default value : all tags are included. no
filter.excludeTags Array containing tags to exclude in the search, possible values : "EMAIL", "SMS", "TRANSACTIONAL" (Automatic campaigns and "TEST". A tag must not be included and excluded at the same time. Default value : no tag is excluded. no
filter.search Search for a campaign name or automatic campaign name message which contains the input string value no