POST
/
rules
curl --request POST \
  --url https://api.beyondwords.io/v1/rules \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data '{
  "key": "CO2",
  "value": "carbon dioxide",
  "type": "substitute",
  "project": {
    "id": 1
  },
  "content": {
    "id": "d8414aee-4171-419e-be42-bd57e9e2ccd2"
  }
}'
{
  "id": 1,
  "key": "CO2",
  "value": "Carbon dioxide",
  "type": "substitute",
  "project": {
    "id": 1,
    "name": "Test project"
  },
  "content": {
    "id": "d8414aee-4171-419e-be42-bd57e9e2ccd2",
    "title": "Unveiling the Catastrophic Consequences of Excess Carbon Dioxide Emissions"
  },
  "created": "2023-01-01 00:00:00 UTC",
  "updated": "2023-01-01 00:00:05 UTC"
}

Authorizations

X-Api-Key
string
header
required

Body

application/json

Response

201 - application/json
successful

The response is of type object.