Create a fail-reason list
curl --request POST \ --url https://api.whatsbuilt.fi/v1/organisation/fail-reason-lists \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "reasons": [ "example" ] }'“Other” is always offered and is never on a list. A repeat with the same Idempotency-Key and body returns the first list with 200; another body answers 422. Once it is deleted, the key answers 410 RESOURCE_DELETED and makes nothing.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”A repeat with the same key and body returns the first answer instead of writing again. Keys are per integration and project.
Request Bodyrequired
Section titled “Request Bodyrequired”The body of createOrganisationFailReasonList.
object
Example generated
{ "name": "example", "reasons": [ "example" ]}Responses
Section titled “Responses”The list an earlier call with the same Idempotency-Key created
One of the organisation’s fail-reason lists; template_count for an organisation admin only.
object
Example generated
{ "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "name": "example", "reasons": [ "example" ], "is_default": true, "modified_date": "example", "template_count": 1}The list
One of the organisation’s fail-reason lists; template_count for an organisation admin only.
object
Example generated
{ "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "name": "example", "reasons": [ "example" ], "is_default": true, "modified_date": "example", "template_count": 1}Invalid body or parameters
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}Missing, malformed, expired or revoked token
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}INSUFFICIENT_SCOPE; INSUFFICIENT_ROLE when the principal is not an admin of its organisation; PUBLIC_API_DISABLED
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}Not one of the organisation’s own; a project’s answers 404 here
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}The organisation has its maximum of lists, or the name is taken
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}RESOURCE_DELETED: what this Idempotency-Key created has since been deleted; details.id names it
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}IDEMPOTENCY_KEY_REUSED: the key was used with another body
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}RATE_LIMITED; wait for Retry-After seconds
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}Not available yet
The error body of every /v1 answer of 400 or more.
object
A sentence for people; it may change
Part of the contract
What the code names, where it names something
The X-Request-Id of the call
Example generated
{ "error": "example", "code": "example", "details": "example", "request_id": "example"}