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.eyJleHAiOjE3MTAyNTQ3MjcsInN1YiI6NDd9.-tynOYRJU6zzPhhvCz0j60Cn3VkSFH9iJjKoKpdc-w0
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/"7f0dd506885e71f571b7f23b551ffc37"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: dd01d3c5-6ee0-4b07-a9d5-2d5d4c103763
X-Runtime: 0.012914
Content-Length: 357

Status

201 Created

Body

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