Sections ▾

POST ​/api​/beacons

Create new Beacon

  
  curl -X POST "https://app.contexthub.com/api/beacons" \
       -H "CONTEXTHUB_DEVICE_ID: DB4E6157-D64F-43EE-B114-39A13D2B9BC7" \
       -H "Content-Type: application/json" \
       -H "Authorization: Token token=\"534e565f-335a-469d-974e-e18a85f00d2d\"" \
       -d $'{\n  "beacon": {\n    "name": "Beacon 7",\n    "uuid": "AD0A19FF-72AF-4377-8C66-C93604EDAB9E",\n    "major": 58,\n    "minor": 26,\n    "tags": [\n      "foo"\n    ]\n  }\n}' \
       -v \
  

Request

Example Request

{
  "beacon": {
    "name": "Beacon 7",
    "uuid": "AD0A19FF-72AF-4377-8C66-C93604EDAB9E",
    "major": 58,
    "minor": 26,
    "tags": [
      "foo"
    ]
  }
}

Example Parameters

Response

Example Response

{
  "id": 42,
  "name": "Beacon 7",
  "uuid": "1365ffc7274945d24c20eb1e1fdd0e41e6867bb9751ceedbee61a29cf52baa67",
  "major": 58,
  "minor": 26,
  "tags": [
    "office"
  ],
  "tag_string": "tag1,tag2,tag3"
}

Response Parameters

Response Codes

Successful Response Codes

Failure Response Codes