Show examples in:
JavascriptHTTP
Endpoint info
Available examples
Dashboard API > Organization mandate request

Request a new mandate

Warning: Experimental API

Please note that the Dashboard API is an experimental, prerelease API. This API method is considered unstable, and should be avoided in production environments and automations. Changes may occur at any time without warning.

Query parameters

auto_approvestring

If the account is also part of the target organization, the request can be automatically approved

Example:"true"

Body parameters

typestringRequired

Must be exactly "organization_mandate_request".

relationships.approver_organization.dataRequired

Organization approving the mandate

Type:<a href="/docs/content-management-api/resources/organization">ResourceLinkage&#x3C;"organization"></a>

Examples

POST https://site-api.datocms.com/organization-mandate-requests HTTP/1.1
Authorization: Bearer YOUR-API-TOKEN
Accept: application/json
X-Api-Version: 3
Content-Type: application/vnd.api+json
{
"data": {
"type": "organization_mandate_request",
"relationships": {
"approver_organization": {
"data": {
"type": "organization",
"id": "124"
}
}
}
}
}
Terminal window
curl -g 'https://site-api.datocms.com/organization-mandate-requests' \
-X POST \
-H "Authorization: Bearer YOUR-API-TOKEN" \
-H "Accept: application/json" \
-H "X-Api-Version: 3" \
-H "Content-Type: application/vnd.api+json" \
--data-binary '{"data":{"type":"organization_mandate_request","relationships":{"approver_organization":{"data":{"type":"organization","id":"124"}}}}}'
await fetch("https://site-api.datocms.com/organization-mandate-requests", {
method: "POST",
headers: {
Authorization: "Bearer YOUR-API-TOKEN",
Accept: "application/json",
"X-Api-Version": "3",
"Content-Type": "application/vnd.api+json",
},
body: JSON.stringify({
data: {
type: "organization_mandate_request",
relationships: {
approver_organization: { data: { type: "organization", id: "124" } },
},
},
}),
});
HTTP/1.1 200 OK
Content-Type: application/json
Cache-Control: cache-control: max-age=0, private, must-revalidate
X-RateLimit-Limit: 30
X-RateLimit-Remaining: 28
{
"data": {
"type": "organization_mandate_request",
"id": "312",
"relationships": {
"approver_organization": {
"data": {
"type": "organization",
"id": "124"
}
},
"requester_organization": {
"data": {
"type": "organization",
"id": "124"
}
}
},
"meta": {
"requester_organization_name": false,
"approver_organization_name": false
}
}
}