Bounties

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

The Bounty model

The Bounty model contains all the information about your bounties, such as their amount, status, and task.

Required properties

Name
id
Type
string
Description

Unique identifier for the object.

Name
task
Type
Task
Description

Task to be done to collect the bounty such as resolving a bug, implementing a new feature or submitting a code review.

Name
amount
Type
integer
Description

Amount intended to be rewarded by the bounty. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or equivalent in charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).

Name
currency
Type
string
Description

Three-letter ISO currency code, in uppercase. Currently, only USD is allowed. If you'd like to pay in another currency, please get in touch with us.

This value only determines what currency the bounty will be paid in. The solver can receive the payment in many other currencies via currency conversions as needed.

Name
status
Type
string
Description

Status of the bounty

Can be one of: active, inactive

Name
created_at
Type
string
Description

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

Name
updated_at
Type
string
Description

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


GET/orgs/{org}/bounties

List bounties

This public endpoint allows you to retrieve a paginated list of bounties created by the given organization.

Path parameters

Name
org*
Type
string
Description

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
/orgs/{org}/bounties
curl --request GET \
  --url 'https://console.algora.io/api/orgs/string/bounties?limit=1&cursor=string' \
  --header 'authorization: Bearer <token>'

Response

{
  "next_cursor": "string",
  "items": [
    {
      "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"
    }
  ]
}

GET/bounties

List bounties of the authenticated org

This endpoint allows you to retrieve a paginated list of your organization's bounties.

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

Response

{
  "next_cursor": "string",
  "items": [
    {
      "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"
    }
  ]
}

GET/bounties/{id}

Retrieve a bounty

Retrieves the details of a bounty.

Path parameters

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

Request

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

Response

{
  "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"
}

POST/bounties

Create bounties

Creates one or more bounties. Only 1 bounty per issue is allowed by each org. Duplicate bounty attempts on the same issue will be skipped silently.

Body parameters

Name
bounties*
Type
array
Description
List of bounties to create.
Name
forge*
Type
string
Description
Platform where the issue resides. Currently, only "github" is allowed. If you'd like to use another forge, please get in touch with us.
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
amount*
Type
integer
Description
Amount intended to be rewarded by the bounty. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or equivalent in charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
Name
currency*
Type
string
Description
Three-letter ISO currency code, in uppercase. Currently, only "USD" is allowed. If you'd like to pay in another currency, please get in touch with us.

Request

POST
/bounties
curl --request POST \
  --url https://console.algora.io/api/bounties \
  --header 'authorization: Bearer <token>' \
  --data '{
  "bounties": [
    {
      "forge": "github",
      "repo_owner": "string",
      "repo_name": "string",
      "number": 1,
      "amount": 50,
      "currency": "USD"
    }
  ]
}'

Response

{
  "count": 0
}

PATCH/bounties/{id}

Update a bounty

Updates properties on a bounty.

Path parameters

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

Body parameters

Name
reward
Type
object
Description
Name
amount*
Type
integer
Description
Amount intended to be rewarded by the bounty. A positive integer representing how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or equivalent in charge currency. The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99).
Name
currency*
Type
string
Description
Three-letter ISO currency code, in uppercase. Currently, only "USD" is allowed. If you'd like to pay in another currency, please get in touch with us.
Name
status
Type
string
Description
Status of the bounty.

Request

PATCH
/bounties/{id}
curl --request PATCH \
  --url https://console.algora.io/api/bounties/string \
  --header 'authorization: Bearer <token>' \
  --data '{
  "reward": {
    "amount": 50,
    "currency": "USD"
  },
  "status": "active"
}'

Response

{
  "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"
}

DELETE/bounties/{id}

Delete a bounty

Deletes a bounty

Path parameters

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

Request

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

Response

{
  "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"
}