Create a human agent
POST/agents
Create a human agent.
⚠️ This may charge the card on file. An agent occupies a seat; if the plan has none free, a prorated charge is taken for the rest of the billing period, exactly as in the console. Two consequences to design around:
- A
402withcode: seat_charge_failedmeans the card was declined and nothing was created — the agent is rolled back before the response is written, so a retry is safe. - A
201may carry aseat_chargeobject saying what was charged. Log it: "why did my invoice go up" is a question an automated provisioning integration will eventually have to answer.
Omit password and the new agent is emailed a one-time link to set their own —
the right choice for a real person. Supply one and the account works
immediately, which suits a service account a machine will drive.
role_id comes from GET /v1/roles. Omitted, the account's default Agent role
is applied, which is a working least-privilege role rather than no permissions.
Request
Responses
- 201
- 400
- 401
- 402
- 403
- 409
Agent created.
Response Headers
Correlation id for this request. Quote it when reporting a problem.
The request was malformed, or a parameter was rejected.
Response Headers
Correlation id for this request. Quote it when reporting a problem.
No token, an expired token, or a credential that has been revoked.
Response Headers
Correlation id for this request. Quote it when reporting a problem.
A plan ceiling or a locked feature stopped an otherwise valid request.
Response Headers
Correlation id for this request. Quote it when reporting a problem.
Refused. Either the credential does not hold the scope this endpoint needs (code: insufficient_scope), or the account's IP allow-list does not include the calling address (code: ip_not_allowed).
Response Headers
Correlation id for this request. Quote it when reporting a problem.
The request was valid but conflicts with the current state.
Response Headers
Correlation id for this request. Quote it when reporting a problem.