Claims

On this page, we'll dive into the different claim endpoints you can use to manage the bounty claims of your solvers programmatically. We'll look at how to query, create, update, and delete claims.

The Claim model

The Claim model contains all the information about the bounty claims of your solvers, such as their status and solver details.

Required properties

Name
id
Type
string
Description

Unique identifier for the object.

Name
status
Type
string
Description

Status of the claim Can be one of: pending, accepted, payment_processing, payment_succeeded

Name
solver
Type
Solver
Description

Details of the solver on the platform where the issue resides. For instance, if the issue was created on Github, solver's user details on Github is returned.

Name
bounty
Type
Bounty
Description

Details of the bounty

Name
created_at
Type
string
Description

Timestamp of when the claim was created, in ISO 8601 format: YYYY-MM-DDTHH:MM:SSSZ.

Name
updated_at
Type
string
Description

Timestamp of when the claim was last updated, in ISO 8601 format: YYYY-MM-DDTHH:MM:SSSZ.


GET/claims

List all bounty claims

Returns a list of bounty claims.

Query parameters

Name
limit
Type
number
Description
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
Name
cursor
Type
string
Description
A cursor for use in pagination. It's an object ID that defines your place in the list.

Request

GET
/claims
curl --request GET \
  --url 'https://console.algora.io/api/claims?limit=1&cursor=string' \
  --header 'authorization: Bearer <token>'

Response

{
  "next_cursor": "string",
  "items": [
    {
      "id": "string",
      "status": "pending",
      "solver": {
        "id": 0,
        "login": "string",
        "avatar_url": "string",
        "gravatar_id": {},
        "url": "string",
        "html_url": "string",
        "followers_url": "string",
        "following_url": "string",
        "gists_url": "string",
        "starred_url": "string",
        "subscriptions_url": "string",
        "organizations_url": "string",
        "repos_url": "string",
        "events_url": "string",
        "received_events_url": "string",
        "type": "string",
        "site_admin": true,
        "name": {},
        "email": {}
      },
      "bounty": {
        "id": "string",
        "reward": {
          "amount": 50,
          "currency": "USD"
        },
        "status": "active",
        "org": {
          "id": "string",
          "handle": "string",
          "domain": {}
        },
        "task": {
          "id": "string",
          "forge": "github",
          "repo_owner": "string",
          "repo_name": "string",
          "number": 1,
          "source": {
            "type": "unknown"
          }
        },
        "created_at": "2019-08-24T14:15:22Z",
        "updated_at": "2019-08-24T14:15:22Z"
      },
      "url": "string",
      "created_at": "2019-08-24T14:15:22Z",
      "updated_at": "2019-08-24T14:15:22Z"
    }
  ]
}

GET/claims/{id}

Retrieve a bounty claim

Retrieves the details of a bounty claim.

Path parameters

Name
id*
Type
string
Description
Unique identifier for the object.

Request

GET
/claims/{id}
curl --request GET \
  --url https://console.algora.io/api/claims/string \
  --header 'authorization: Bearer <token>'

Response

{
  "id": "string",
  "status": "pending",
  "solver": {
    "id": 0,
    "login": "string",
    "avatar_url": "string",
    "gravatar_id": {},
    "url": "string",
    "html_url": "string",
    "followers_url": "string",
    "following_url": "string",
    "gists_url": "string",
    "starred_url": "string",
    "subscriptions_url": "string",
    "organizations_url": "string",
    "repos_url": "string",
    "events_url": "string",
    "received_events_url": "string",
    "type": "string",
    "site_admin": true,
    "name": {},
    "email": {}
  },
  "bounty": {
    "id": "string",
    "reward": {
      "amount": 50,
      "currency": "USD"
    },
    "status": "active",
    "org": {
      "id": "string",
      "handle": "string",
      "domain": {}
    },
    "task": {
      "id": "string",
      "forge": "github",
      "repo_owner": "string",
      "repo_name": "string",
      "number": 1,
      "source": {
        "type": "unknown"
      }
    },
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z"
  },
  "url": "string",
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z"
}

POST/claims

Create bounty claim

Creates a bounty claim on behalf of your solver.

Body parameters

Name
repo_owner*
Type
string
Description
Owner of the repository.
Name
repo_name*
Type
string
Description
Name of the repository.
Name
number*
Type
integer
Description
Number of the issue/pull request.
Name
solver*
Type
string
Description
Name
url
Type
string
Description
Name
status*
Type
string
Description
Status of the claim.

Request

POST
/claims
curl --request POST \
  --url https://console.algora.io/api/claims \
  --header 'authorization: Bearer <token>' \
  --data '{
  "repo_owner": "string",
  "repo_name": "string",
  "number": 1,
  "solver": "string",
  "url": "string",
  "status": "pending"
}'

Response

{
  "id": "string",
  "status": "pending",
  "solver": {
    "id": 0,
    "login": "string",
    "avatar_url": "string",
    "gravatar_id": {},
    "url": "string",
    "html_url": "string",
    "followers_url": "string",
    "following_url": "string",
    "gists_url": "string",
    "starred_url": "string",
    "subscriptions_url": "string",
    "organizations_url": "string",
    "repos_url": "string",
    "events_url": "string",
    "received_events_url": "string",
    "type": "string",
    "site_admin": true,
    "name": {},
    "email": {}
  },
  "bounty": {
    "id": "string",
    "reward": {
      "amount": 50,
      "currency": "USD"
    },
    "status": "active",
    "org": {
      "id": "string",
      "handle": "string",
      "domain": {}
    },
    "task": {
      "id": "string",
      "forge": "github",
      "repo_owner": "string",
      "repo_name": "string",
      "number": 1,
      "source": {
        "type": "unknown"
      }
    },
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z"
  },
  "url": "string",
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z"
}

POST/bounties/{id}/claims

Create a claim for the given bounty

Creates a bounty claim on behalf of your solver.

Path parameters

Name
id*
Type
string
Description
Unique identifier for the object.

Body parameters

Name
repo_owner*
Type
string
Description
Owner of the repository.
Name
repo_name*
Type
string
Description
Name of the repository.
Name
number*
Type
integer
Description
Number of the issue/pull request.
Name
solver*
Type
string
Description
Name
url
Type
string
Description
Name
status*
Type
string
Description
Status of the claim.

Request

POST
/bounties/{id}/claims
curl --request POST \
  --url https://console.algora.io/api/bounties/string/claims \
  --header 'authorization: Bearer <token>' \
  --data '{
  "repo_owner": "string",
  "repo_name": "string",
  "number": 1,
  "solver": "string",
  "url": "string",
  "status": "pending"
}'

Response

{
  "id": "string",
  "status": "pending",
  "solver": {
    "id": 0,
    "login": "string",
    "avatar_url": "string",
    "gravatar_id": {},
    "url": "string",
    "html_url": "string",
    "followers_url": "string",
    "following_url": "string",
    "gists_url": "string",
    "starred_url": "string",
    "subscriptions_url": "string",
    "organizations_url": "string",
    "repos_url": "string",
    "events_url": "string",
    "received_events_url": "string",
    "type": "string",
    "site_admin": true,
    "name": {},
    "email": {}
  },
  "bounty": {
    "id": "string",
    "reward": {
      "amount": 50,
      "currency": "USD"
    },
    "status": "active",
    "org": {
      "id": "string",
      "handle": "string",
      "domain": {}
    },
    "task": {
      "id": "string",
      "forge": "github",
      "repo_owner": "string",
      "repo_name": "string",
      "number": 1,
      "source": {
        "type": "unknown"
      }
    },
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z"
  },
  "url": "string",
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z"
}

PATCH/claims/{id}

Update a bounty claim

Updates properties on a bounty claim.

Path parameters

Name
id*
Type
string
Description
Unique identifier for the object.

Body parameters

Name
status
Type
string
Description
Status of the claim.

Request

PATCH
/claims/{id}
curl --request PATCH \
  --url https://console.algora.io/api/claims/string \
  --header 'authorization: Bearer <token>' \
  --data '{
  "status": "pending"
}'

Response

{
  "id": "string",
  "status": "pending",
  "solver": {
    "id": 0,
    "login": "string",
    "avatar_url": "string",
    "gravatar_id": {},
    "url": "string",
    "html_url": "string",
    "followers_url": "string",
    "following_url": "string",
    "gists_url": "string",
    "starred_url": "string",
    "subscriptions_url": "string",
    "organizations_url": "string",
    "repos_url": "string",
    "events_url": "string",
    "received_events_url": "string",
    "type": "string",
    "site_admin": true,
    "name": {},
    "email": {}
  },
  "bounty": {
    "id": "string",
    "reward": {
      "amount": 50,
      "currency": "USD"
    },
    "status": "active",
    "org": {
      "id": "string",
      "handle": "string",
      "domain": {}
    },
    "task": {
      "id": "string",
      "forge": "github",
      "repo_owner": "string",
      "repo_name": "string",
      "number": 1,
      "source": {
        "type": "unknown"
      }
    },
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z"
  },
  "url": "string",
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z"
}

DELETE/claims/{id}

Delete a bounty claim

Deletes a bounty claim

Path parameters

Name
id*
Type
string
Description
Unique identifier for the object.

Request

DELETE
/claims/{id}
curl --request DELETE \
  --url https://console.algora.io/api/claims/string \
  --header 'authorization: Bearer <token>'

Response

{
  "id": "string",
  "status": "pending",
  "solver": {
    "id": 0,
    "login": "string",
    "avatar_url": "string",
    "gravatar_id": {},
    "url": "string",
    "html_url": "string",
    "followers_url": "string",
    "following_url": "string",
    "gists_url": "string",
    "starred_url": "string",
    "subscriptions_url": "string",
    "organizations_url": "string",
    "repos_url": "string",
    "events_url": "string",
    "received_events_url": "string",
    "type": "string",
    "site_admin": true,
    "name": {},
    "email": {}
  },
  "bounty": {
    "id": "string",
    "reward": {
      "amount": 50,
      "currency": "USD"
    },
    "status": "active",
    "org": {
      "id": "string",
      "handle": "string",
      "domain": {}
    },
    "task": {
      "id": "string",
      "forge": "github",
      "repo_owner": "string",
      "repo_name": "string",
      "number": 1,
      "source": {
        "type": "unknown"
      }
    },
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z"
  },
  "url": "string",
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z"
}

POST/claims/{id}/payments

Initiate a payment

Creates a payment session for a bounty claim.

Path parameters

Name
id*
Type
string
Description
Unique identifier for the object.

Body parameters

Request

POST
/claims/{id}/payments
curl --request POST \
  --url https://console.algora.io/api/claims/string/payments \
  --header 'authorization: Bearer <token>' \
  --data '{}'

Response

{
  "url": "string"
}