Skip to main content
POST
/
v1
/
challenges
/
open
Open a challenge
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: JSON.stringify({rightId: '<string>', challengerOrgId: '<string>', reason: '<string>'})
};

fetch('https://sandbox.api.enfinitos.com/v1/challenges/open', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
{
  "ok": true,
  "data": {
    "challenge": {
      "id": "<string>",
      "rightId": "<string>",
      "challengerOrgId": "<string>",
      "reason": "<string>",
      "resolvedAt": "2023-11-07T05:31:56Z",
      "resolution": "<string>",
      "createdAt": "2023-11-07T05:31:56Z"
    }
  },
  "contractVersion": "<string>"
}

Authorizations

Authorization
string
header
required

API key sent as Authorization: Bearer <api-key>.

Body

application/json
rightId
string
required

The right being challenged (prefixed rgh_).

challengerOrgId
string
required

Org id of the challenger.

reason
string
required
Required string length: 1 - 500

Response

The opened challenge.

ok
boolean
required
data
object
required

Route-specific payload. Operation responses refine this.

contractVersion
string
required
Allowed value: "v1.0"