Show examples in:
JavascriptHTTP
Endpoint info
Available examples
Dashboard API > Site transfer request

Accept a site transfer request

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.

Body parameters

typestringRequired

Must be exactly "site_transfer_acceptance".

attributes.payment_intent_idstringOptional
attributes.billing_profilenull, objectOptional
address_linestringRequired
citystringRequired
countrystringRequired
emailstringRequired
first_namestringRequired
last_namestringRequired
statestringRequired
zipstringRequired
companynull, stringOptional
vat_numbernull, stringOptional
cf_cod_fiscalenull, stringOptional
cf_cod_fiscale_partecipante_gruppo_ivanull, stringOptional
relationships.billing_profile.dataOptional

Billing profile

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

Returns

Returns a resource object of type site.

Examples

PUT https://site-api.datocms.com/site-transfers/:field_id_or_api_key/accept HTTP/1.1
Authorization: Bearer YOUR-API-TOKEN
Accept: application/json
X-Api-Version: 3
Content-Type: application/vnd.api+json
{
"data": {
"type": "site_transfer_acceptance"
}
}
Terminal window
curl -g 'https://site-api.datocms.com/site-transfers/:field_id_or_api_key/accept' \
-X PUT \
-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":"site_transfer_acceptance"}}'
await fetch(
"https://site-api.datocms.com/site-transfers/:field_id_or_api_key/accept",
{
method: "PUT",
headers: {
Authorization: "Bearer YOUR-API-TOKEN",
Accept: "application/json",
"X-Api-Version": "3",
"Content-Type": "application/vnd.api+json",
},
body: JSON.stringify({ data: { type: "site_transfer_acceptance" } }),
},
);
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": "site",
"id": "155",
"attributes": {
"name": "My blog",
"domain": "admin.foobar.com",
"internal_domain": "clueless-star-1231.admin.datocms.com",
"last_data_change_at": "2020-04-21T07:57:11.124Z",
"access_token": "",
"created_at": "2020-04-21T07:57:11.124Z",
"deactivated": true
},
"meta": {
"last_data_change_at": "2017-03-30T09:29:14.872Z",
"created_at": "2017-03-30T09:29:14.872Z",
"deactivated": true,
"status": "",
"owner": {
"type": "account",
"email": "mark@foobar.com"
},
"require_2fa": false
},
"relationships": {
"active_subscription": {
"data": null
},
"active_plan": {
"data": null
},
"transfer": {
"data": {
"type": "site_transfer",
"id": "124"
}
}
}
}
}