Integrations key

Create an integration key

Creates an integration key against a service (key_service_id), owned by the calling user and enabled on creation.

The required secret depends on the service's auth method: token-based services require token; password-based services require password and identifier. The auth_method and identifier_type are copied from the service.

post/v1/integrations/keys

Parameters

#/paths/~1v1~1bills/get/parameters/0 — unresolved $ref

Request body

key_service_idstring required

Id of the integration service (Integrations::KeyService) to authenticate against.

tokenstring

API token. Required when the key service's auth method is token.

passwordstring

Account password. Required when the key service's auth method is password.

identifierstring

Account identifier (e.g. RUT). Required when the auth method is password.

Example request

{
  "key_service_id": "sii",
  "identifier": "11111111-1"
}

Response

The created integration key.

idstring uuid required
statusstring required
enabledboolean nullable
auth_method'token' | 'password' required

Authentication method, inherited from the key service.

identifierstring nullable

The account identifier (e.g. RUT/username) for password-based services.

identifier_typestring nullable
key_service_idstring required

Id of the integration service this key authenticates against.

user_idstring required

Owner of the key.

company_idsstring[]

Ids of the companies managed with this key, added via serializer method.

metaobject nullable
created_atstring date-time
updated_atstring date-time

Example response

{
  "status": "active",
  "auth_method": "password"
}

Changes