Skip to content

Access Keys Management API (v1)

This API provides programmatic access to manage Access Keys for projects. Access keys can be used to generate access tokens which grant access to other resource APIs.

Download OpenAPI description
Overview
License
Languages
Servers
https://account.api.sinch.com

Access Key

Manage Access Keys

Operations

List Keys

Request

Lists all Access Keys for project.

Security
OAuth2 or Basic
Path
projectIdstringrequired

Required. List keys for the provided project.

Query
pageSizeinteger(int32)

Optional. The maximum number of results to return in a single response. It must be in the range 1-1000. If left empty, a default page size of 100 is used.

pageTokenstring

Optional. The pagination token returned in an earlier response.

curl -i -X GET \
  'https://account.api.sinch.com/v1/projects/{projectId}/accessKeys?pageSize=0&pageToken=string' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
accessKeysArray of objects(AccessKey)

Collection of Access Keys.

nextPageTokenstring

The next pagination token, or an empty value if there are no more results.

Response
application/json
{ "accessKeys": [ {} ], "nextPageToken": "string" }

Create Access Key

Request

Creates an Access Key for the given project. Returns the new key and its credentials.

Security
OAuth2 or Basic
Path
projectIdstringrequired
Bodyapplication/jsonrequired
displayNamestring

Required. The display name for this Access Key. It must be unique for the resource tied to the key.

curl -i -X POST \
  'https://account.api.sinch.com/v1/projects/{projectId}/accessKeys' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "displayName": "My production Access Key"
  }'

Responses

OK

Bodyapplication/json
accessKeyobject

The newly created Access Key.

secretstring

The Access Key secret. After an Access Key has been created it is impossible to retrieve its secret again.

Response
application/json
{ "accessKey": { "accessKeyId": "string", "displayName": "string", "projectId": "string", "createTime": "2019-08-24T14:15:22Z", "updateTime": "2019-08-24T14:15:22Z" }, "secret": "string" }

Get Access Key

Request

Retrieves a single Access Key.

Security
OAuth2 or Basic
Path
projectIdstringrequired
accessKeyIdstringrequired

Required. The ID of the Access Key.

curl -i -X GET \
  'https://account.api.sinch.com/v1/projects/{projectId}/accessKeys/{accessKeyId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Bodyapplication/json
accessKeyIdstring

Unique ID for this Access Key.

displayNamestring

The display name for this Access Key. It must be unique for the resource tied to the key.

projectIdstring

The project ID this key is tied to.

createTimestring(date-time)

Timestamp when the Access Key was created.

updateTimestring(date-time)

Timestamp when the Access Key was last modified.

Response
application/json
{ "accessKeyId": "string", "displayName": "string", "projectId": "string", "createTime": "2019-08-24T14:15:22Z", "updateTime": "2019-08-24T14:15:22Z" }

Delete Access Key

Request

Deletes an Access Key. Note: It is currently possible to delete the same Access Key that is used for the delete operation. This means it is possible to delete the last Access Key. In this scenario a new access key needs to be generated in the customer dashbaord,

Security
OAuth2 or Basic
Path
projectIdstringrequired
accessKeyIdstringrequired

Required. The ID of the Access Key to be deleted.

curl -i -X DELETE \
  'https://account.api.sinch.com/v1/projects/{projectId}/accessKeys/{accessKeyId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

OK

Body
Response
No content

Update Access Key

Request

Updates an Access Key with new information.

Security
OAuth2 or Basic
Path
projectIdstringrequired
accessKeyIdstringrequired
Bodyapplication/jsonrequired
displayNamestring

Required. The display name for this Access Key. It must be unique for the resource tied to the key.

curl -i -X PATCH \
  'https://account.api.sinch.com/v1/projects/{projectId}/accessKeys/{accessKeyId}' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "displayName": "My staging Access Key"
  }'

Responses

OK

Bodyapplication/json
accessKeyIdstring

Unique ID for this Access Key.

displayNamestring

The display name for this Access Key. It must be unique for the resource tied to the key.

projectIdstring

The project ID this key is tied to.

createTimestring(date-time)

Timestamp when the Access Key was created.

updateTimestring(date-time)

Timestamp when the Access Key was last modified.

Response
application/json
{ "accessKeyId": "string", "displayName": "string", "projectId": "string", "createTime": "2019-08-24T14:15:22Z", "updateTime": "2019-08-24T14:15:22Z" }