Contacts API

create new entry

POST /api/rest/admin/contacts

Parameters

Name Description
data[type] Resource type (contacts)
data[attributes][email] Email
data[attributes][notes] Notes
data[relationships][contractor] Contractor

Request

Headers

Version: HTTP/1.0
Accept: application/vnd.api+json
Content-Type: application/vnd.api+json
Authorization: eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE3MzE1Nzg3NTEsInN1YiI6Njd9.4IpwaL5G2g_qfzhKv-HTO4xEjZLbBoZM-K5-_Il3l_w
Host: example.org
Cookie: 

Route

POST /api/rest/admin/contacts

Body

{"data":{"type":"contacts","attributes":{"email":"some@mail.com","notes":"Text here..."}}}

Response

Headers

X-Frame-Options: SAMEORIGIN
X-XSS-Protection: 0
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Permitted-Cross-Domain-Policies: none
Referrer-Policy: strict-origin-when-cross-origin
Content-Type: application/vnd.api+json
Vary: Accept
ETag: W/"8d00a11e53e3b8c765d204e187477904"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: 67e45a7d-bd9f-41d6-b511-bbb8028bb794
X-Runtime: 0.015500
Content-Length: 369

Status

201 Created

Body

{
  "data": {
    "id": "61",
    "type": "contacts",
    "links": {
      "self": "http://example.org/api/rest/admin/contacts/61"
    },
    "attributes": {
      "email": "some@mail.com",
      "notes": "Text here..."
    },
    "relationships": {
      "contractor": {
        "links": {
          "self": "http://example.org/api/rest/admin/contacts/61/relationships/contractor",
          "related": "http://example.org/api/rest/admin/contacts/61/contractor"
        },
        "data": null
      }
    }
  }
}