Skip to main content
POST
/
benefits
/
v1
Create a benefit
curl --request POST \
  --url https://api.spacebring.com/benefits/v1 \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "benefit": {
    "categoryRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "locationRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "title": "<string>",
    "application": {
      "allowance": "unlimited",
      "buttonLabel": "apply",
      "confirmationEmail": {
        "enabled": false,
        "template": ""
      },
      "enabled": true
    },
    "description": "",
    "featured": false,
    "media": [
      {
        "key": "<string>"
      }
    ],
    "subtitle": "",
    "visibility": "public"
  }
}
'
{
  "application": {
    "confirmationEmail": {
      "enabled": true,
      "template": "<string>"
    },
    "enabled": true
  },
  "categoryRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "createDate": "2023-11-07T05:31:56Z",
  "description": "<string>",
  "featured": true,
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "locale": "<string>",
  "locationRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "media": [
    {
      "key": "<string>",
      "url": "<string>"
    }
  ],
  "networkRef": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "subtitle": "<string>",
  "title": "<string>",
  "updateDate": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

See our authentication documentation for how to authorize your requests

Headers

spacebring-network-id
string<uuid>

The id of the network. Required when using bearer token authentication

Body

application/json
benefit
object
required

Benefit to create.

Response

Created

application
object
required

Settings controlling how users apply for this benefit.

categoryRef
string<uuid>
required

ID of the benefit category this benefit belongs to.

createDate
string<date-time>
required

ISO timestamp of when the benefit was created.

description
string
required

Full description of the benefit.

Whether the benefit is highlighted in listings.

id
string<uuid>
required

Unique identifier of the benefit.

locale
string
required

Auto-detected language of the description.

locationRef
string<uuid>
required

ID of the location this benefit is associated with.

media
object[]
required

Media files attached to this benefit.

networkRef
string<uuid>
required

ID of the network this benefit belongs to.

subtitle
string
required

Short tagline displayed below the title.

title
string
required

Display name of the benefit.

visibility
enum<string>
required

Who can see this benefit: 'public' (everyone), 'admins', 'members', or 'networkMembers'.

Available options:
public,
admins,
members,
networkMembers
updateDate
string<date-time>

ISO timestamp of the last update.