POST /v1/blocks

Service: follows · operationId: (none)

Required scopes

(no scope declared — review service config)

Request body

{
  "type": "object",
  "properties": {
    "blocker_id": {
      "type": "string",
      "minLength": 1
    },
    "blocked_id": {
      "type": "string",
      "minLength": 1
    },
    "brand_id": {
      "type": "string",
      "minLength": 1
    }
  },
  "required": [
    "blocker_id",
    "blocked_id",
    "brand_id"
  ]
}

Responses

201 Block created

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "blocker_id": {
      "type": "string"
    },
    "blocked_id": {
      "type": "string"
    },
    "brand_id": {
      "type": "string"
    },
    "created_at": {
      "type": "string"
    }
  },
  "required": [
    "id",
    "blocker_id",
    "blocked_id",
    "brand_id",
    "created_at"
  ]
}

400 Validation error

{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "error",
    "message"
  ]
}

409 Already blocked

{
  "type": "object",
  "properties": {
    "error": {
      "type": "string"
    },
    "message": {
      "type": "string"
    }
  },
  "required": [
    "error",
    "message"
  ]
}

Example

curl -X POST https://follows.platform.loop.health/v1/blocks \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'