Contact

A contact represents a reusable collection of contact data like givenname, surname, email, mobile. Contacts can be used as recipients for file uploads.

Get the contact

GET /contacts/:id

Response

Status: 200 OK
{
  "contact": {
    "id": 23,
    "givenname": "Jane",
    "surname": "Doe",
    "email": "jane@example.com",
    "key_email": "keymail@example.com",
    "mobile": "49123456789",
    "language": "en",
    "storage": "{\"key1\":\"value5\"}",
    "channel": "mobile",
    "created_at": "2011-12-03T04:33:35Z",
    "links": [
      {
        "rel": "self",
        "href": "https://portal.cryptorage.com/api/contacts/23"
      }
    ]
  }
}

Error

Status: 404 Not Found
{
  "error": "ERR_CONTACT_NOT_FOUND"
}

General error

Status: 500 Server Error
error message

Put contact

PUT /contacts
Payload:
{
  "id": 23,
  "contact": {
    "givenname": "Jane",
    "surname": "Doe",
    "email": "jane@example.com",
    "key_email": "keymail@example.com",
    "mobile": "49123456789",
    "language": "en",
    "storage": "{\"key1\":\"value5\"}",
    "channel": "mobile"
  }
}

Response

Status: 201 Created
{
  "contact": {
    "id": 23,
    "givenname": "Jane",
    "surname": "Doe",
    "email": "jane@example.com",
    "key_email": "keymail@example.com",
    "mobile": "49123456789",
    "language": "en",
    "storage": "{\"key1\":\"value5\"}",
    "channel": "mobile",
    "created_at": "2011-12-03T04:33:35Z",
    "links": [
      {
        "rel": "self",
        "href": "https://portal.cryptorage.com/api/contacts/23"
      }
    ]
  }
}

Error

Status: 409 Conflict
{
  "error": "ERR_CONTACT_NOT_VALID"
}

General error

Status: 500 Server Error
error message