Create a client
Creates a new client in the authenticated organization. The server auto-wires any matching integration assignment rules based on the supplied `domain` (same behaviour as the dashboard create flow). **`organizationId` must not be included in the body.** The organization is resolved from the bearer token; a body-borne `organizationId` is rejected with `400 invalid_argument` rather than silently overridden.
POST
/clients
Authorization
Section titled “Authorization”bearerAuth``
AuthorizationBearer <token>
Salfio API tokens start with the literal prefix sk_live_ followed by 32 base62 characters (≈190 bits of entropy). Tokens are hashed at rest with argon2id and shown to the user only once at creation.
In: header
Request Body
Section titled “Request Body”application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
Section titled “Response Body”application/json
application/json
application/json
application/json
curl -X POST "https://api.salfio.com/v1/clients" \ -H "Content-Type: application/json" \ -d '{ "name": "Globex" }'
{
"meta": {
"cursor": "string",
"hasMore": true
},
"data": {
"id": "8b2d1c4e-3f5a-4e2b-9c8f-1e2d3c4b5a6f",
"name": "Acme Corp",
"domain": "acme.com",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z",
"accountManagers": [
{
"userId": "2c4a230c-5085-4924-a3e1-25fb4fc5965b",
"firstName": "string",
"lastName": "string",
"email": "[email protected]"
}
],
"clientType": "active"
}
}
{
"error": {
"code": "invalid_argument",
"message": "limit must be an integer between 1 and 100"
}
}
{
"error": {
"code": "unauthorized",
"message": "Authentication required"
}
}
{
"error": {
"code": "rate_limited",
"message": "Rate limit exceeded",
"details": {
"retry_after_seconds": 30
}
}
}