---
title: "Add a contact photo"
description: "POST /contacts/{contact_id}/contact_photo — Use this endpoint to add a new photo to an existing contact. It takes a parameter `image`, which must be a Base64 encoded string of the image data."
canonical_url: https://developer.onepagecrm.com/api/reference/contacts/post-contacts-contact_id-contact_photo/
source: Markdown mirror of https://developer.onepagecrm.com/api/reference/contacts/post-contacts-contact_id-contact_photo/
---

`POST /contacts/{contact_id}/contact_photo`

Use this endpoint to add a new photo to an existing contact.  It takes a parameter `image`, which must be a Base64 encoded string of the image data. Images will be cropped to a centered square and resized to 200x200 pixels.

Resource: [Contacts](https://developer.onepagecrm.com/api/reference/contacts/) · [API Reference](https://developer.onepagecrm.com/api/reference/)

## Request

```bash
curl -X POST "https://app.onepagecrm.com/api/v3/contacts/{contact_id}/contact_photo" \
  -u $user_id:$api_key \
  -H "Content-Type: application/json" \
  -d '{
    "image": "iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4gkFCR0iiEuUHQAAA8tJREFUaN7tmX1IlHccwD/PvZRpGb0ZTcK6C9ksanIVvQ0rV4RTK5cy9keLbETOGmRBW1SMmX9sLCrbjDKrJfRqucqgyBoUW3EmRYZFXRmzFmmvXL502rM/vkIpPXenPl6Xe37wcHDP73e/3+f7/v2douai0g2GiW4yDBADxAAxQAwQA8QA+X+CNALNATzZq5Y9VT1BIhyQpULaeYhKAE8XAniAiLGQeFj2jFmgI8jwZPkcMhmSSuCbp+D4DkxWkVxnh9qigZh0SL8NaU6wzZV39s/92sM/ELWNfnv0hYk5kPESZu2FAaM6pqVmIHQwxG2GZSpMz4fw4d731hgW/zZs0H4X/YU8TyqhLAeuFYIZUHyYj30mOL6HyLgAOnv5z3LI5kbtOf0+ghl74NsmmPwT9OzX2iRUQDFD7ErIeAzJJ3WDAFD87hDVFlP4MBXGroaBY3yvubAWnD+KdmxzIOFI+0945xgcS/YpclO77NkM3DoIhR9DYTRc/937GvtcWacCwz4LgjwSFgnzr8GUXyBkgEj46U049RX8aoLzWdDwSEON7XPargUZ+TX0j4HY5bCoFlJOQeTUFmmrcHkD/DYQij+F6jOv1zXVeXd6HYelQ6uGzpCn7iFcyoErm8AKVJfC3VLoPQhGLobru8UcA3BP42ce0chIoRHwyUbIVCF+B4Tb5ND1NVCWDe5/gqzWqsiD6rPe58QshPku+LIMbCldW8Z0GKS+BoqmQ/4g8QdvjhvhgIQiWFoP9pQgrH5NQEMtnMuCzSY4vUAil6b3hUi+aQomEHNPiM+HEakSqUyII++Mhn2xklvei34kdoVUprMOQGY9TPgBrGESkWovw4k0yAuBi2vA4/YdJN4ZiMna2mTGrYXFbkgshsHjRUvNjeDMhi19oGQ2VJVIorQEBqRz29hmy/P8LlxaD1e3yy/eOQquozo10oqOGnEdAk+d9vvwKJi2TXqKuFwIHaJfEqzc4dcp/QN5VAFbwuB4Ejz42/vc0Zmw8D6knoP+ozp2+GcuKE2HTQq4inUOv1ag6jjsmwS7hkLFVu/zP5gC8QXtu7BwFcF+BxSMgMoC3w1ap66DLIC7Gs4ugVwF/swA9z2NXzf7NjHPC7i4DraGQsk8qCkXoQXM2ZU3ypfyPIiaJK1rq77jDXEqbWT20Cld541iOYXSuVs2fYJjD+Dfv+CPROgVDo5VUvpX5L02j8oCsM+TwOHMhidVsrtVn5igdMmfoSpSmlja2LjnLd8FRR7xZnZWjYDxzovGIB8GiAFigBggBogBYoB0J5D/ACApEz8hyMzGAAAAAElFTkSuQmCC"
  }'
```

Authentication is HTTP Basic — `user_id` as username, `api_key` as password.
See https://developer.onepagecrm.com/api/authentication/.

## Path parameters

| Name | Type | Description |
| --- | --- | --- |
| `contact_id` | string | Contact ID |

## Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `image` | string (b64-encoded) |  | Base64 encoded string of image data |

## Responses

### 201

Created

```json
{
  "status": 0,
  "message": "OK",
  "timestamp": 1528373119,
  "data": {
    "contact": {
      "id": "5aba31ea9007ba0f570c92d4",
      "title": "Mr",
      "first_name": "Joe",
      "last_name": "Bloggs",
      "job_title": "Engineer",
      "starred": true,
      "photo_url": "https://{foo.bar}/joe-bloggs.jpg",
      "company_id": "5aba31ea9007ba0f570c92d5",
      "company_name": "Morgan's Forensic Lab",
      "urls": [
        {
          "type": "linkedin",
          "value": "https://www.linkedin.com/{joe.bloggs}"
        }
      ],
      "phones": [
        {
          "type": "work",
          "value": "(912) 644-1770"
        }
      ],
      "emails": [
        {
          "type": "work",
          "value": "joe.bloggs@example.com"
        }
      ],
      "address_list": [
        {
          "address": "Unit 5, Business Innovation Centre",
          "city": "Upper Newcastle",
          "state": "Galway",
          "zip_code": "H91 Y0T0",
          "country_code": "IE",
          "type": "delivery"
        }
      ],
      "status": "Prospect",
      "status_id": "5e31e030849d781e837b6ba1",
      "tags": [
        "Java",
        "Android",
        "iOS"
      ],
      "lead_source_id": "email_web",
      "lead_source": "Email or Web",
      "background": "I met Joe Bloggs at the annual Eco Conference in Florida. Her company currently provides solar panels (along with a lot of other stuff) to the State Government of California, Nevada, Oregon, Arizona and Utah for capital building projects. Her current supplier is crazy expensive! I've asked to be able to tender for their next order.",
      "owner_id": "5aba31e99007ba0f570c92a5",
      "custom_fields": [
        {
          "custom_field": {
            "id": "5aad9b039007ba18c9ebad13",
            "name": "Favorite season",
            "type": "select_box",
            "position": 2,
            "choices": [
              "Spring",
              "Summer",
              "Autumn",
              "Winter"
            ]
          },
          "value": "Summer"
        }
      ],
      "letter": "b",
      "pending_deal": true,
      "total_pendings": 999.99,
      "total_deals_count": 3,
      "company_size": 1,
      "sales_closed_for": [
        "5aba31e99007ba0f570c12f7"
      ],
      "closed_sales": [
        {
          "user_id": "5aba31e99007ba0f570c12f7",
          "closed_at": 1524818902,
          "comment": "Client is no longer interested"
        }
      ],
      "google_contacts_data": {
        "account_email": "jane.doe@example.com",
        "id": "342c5b5c08d4b0b2",
        "saved_at": 1522840153
      },
      "created_at": "2018-05-16T11:52:09Z",
      "modified_at": "2018-05-16T11:52:09Z"
    }
  }
}
```

Standard error responses: 400, 401, 403, 404, 409, 500 — shared across the API. See https://developer.onepagecrm.com/api/errors/.

## Related guides

- [Authentication](https://developer.onepagecrm.com/api/authentication/)
- [Errors](https://developer.onepagecrm.com/api/errors/)
- [Rate limits](https://developer.onepagecrm.com/api/rate-limits/)
