### Public Beta Feature

This documentation covers a feature currently in Public Beta. Access is available to anyone interested in building personalized experiences for their end-users.

This feature is subject to the [Personalization API (Self-Service) Public Beta End user License Agreement](https://location.foursquare.com/legal/terms/personalization-apis-self-service-eula/).

#### Parameters

- **api_version**  
  `string`  
  required   
  The API version date as documented [here](https://docs.foursquare.com/developer/reference/versioning); e.g. 20240109

- **venueId**  
  `string`  
  required   
  The ID of a venue, provided only when adding a public photo of the venue in general, rather than a photo for a private check-in, tip, or page update.

- **shout**  
  `string`  
  A message about your check-in. The maximum length of this field is 140 characters.

### Response

#### Successful Check-in Addition Response  
`200`

- **meta**  
  `object`  
  Metadata object containing additional information about the successful check-in request.  
  - **code**  
    `integer`  
    Defaults to 0  
    Status code indicating the result of the check-ins/add POST request.  
  - **requestId**  
    `string`  
    Unique identifier for the API request.

- **notifications**  
  `array of objects`  
  Array of notification objects containing information about the check-in.  
  - **notifications**  
    `object`  
    The response object for successful check-in addition including any notifications.  
    - **item**  
      `object`  
      Response object containing information about the notification of a successful check-in.  
      - **type**  
        `string`  
        The type of notification.

- **response**  
  `object`  
  Object containing the retrieved data for successfully added check-ins.  
  - **checkin**  
    `object`  
    The response object for the successful creation of a check-in contains information about the newly created check-in.  
    - **notifications**  
      `array of objects`  
      Array of notification objects containing information about the check-in.  
    - **alert**  
      `boolean`  
      Defaults to true  
      Flag indicating if the notification item should trigger an alert.  
  - **item**  
    `object`  
    Notification item associated with a successful response to adding a check-in.  
    - **type**  
      `string`  
      The type of notification in a successful response.  
  - **notificationsOrder**  
    `array of strings`  
    Order of notifications in the response for adding a check-in.

### Example Code

```bash
curl --request POST \
     --url https://api.foursquare.com/v2/checkins/add \
     --header 'accept: application/json'
```

### Example Response

```json
{
  "meta": {
    "code": 200,
    "requestId": "6421f092f5e2da1fdeb4f888"
  },
  "notifications": [
    {
      "type": "notificationTray",
      "item": {
        "unreadCount": 3
      }
    },
    {
      "type": "unconfirmed",
      "item": {
        "unreadCount": 0
      }
    }
  ],
  "response": {
    "checkin": {
      "id": "6421f0405c8d094658112a56",
      "createdAt": 1679945792,
      "type": "checkin",
      "timeZoneOffset": -420,
      "editableUntil": 1680032192000,
      "user": {
        "id": "12345678",
        "firstName": "John",
        "lastName": "Smith",
        "gender": "male",
        "address": "",
        "city": "",
        "state": "",
        "countryCode": "US",
        "relationship": "self",
        "photo": {
          "prefix": "https://fastly.4sqi.net/img/user/",
          "suffix": "/blank_boy.png"
        },
        "isAnonymous": false
      },
      "venue": {
        "id": "4b88822df964a52018fd31e3",
        "name": "Lucky Dragon - Chinese Restaurant"
      },
      "source": {
        "name": "Foursquare for iOS",
        "url": "https://foursquare.com/download/#/iphone"
      },
      "photos": {
        "count": 0,
        "items": []
      },
      "posts": {
        "count": 0,
        "textCount": 0
      },
      "checkinShortUrl": "https://www.swarmapp.com/user/123456/checkin/6421f0405c8d094658112a56?s=qtRZqSvVhWt8pNB8fFUsjbMaoLM",
      "likes": {
        "count": 0,
        "groups": []
      },
      "like": false,
      "comments": {
        "count": 0,
        "items": []
      },
      "isMayor": false,
      "score": {
        "total": 0
      }
    },
    "notifications": [
      {
        "type": "message",
        "item": {
          "message": "You've been here 2 times!",
          "entities": [
            {
              "indices": [
                17,
                18
              ],
              "type": "count",
              "value": 2
            }
          ]
        },
        "alert": false
      }
    ],
    "notificationsOrder": [
      "score",
      "leaderboard",
      "replies"
    ]
  }
}
```
