Skip to content

chore: Include 'Bearer' in authorization header documentation #247

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion fern/apis/beta/openapi-beta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27997,7 +27997,7 @@ components:
auth-token:
type: http
description: |-
All the DevRev APIs require a token to authenticate the user. Provide `Authorization: <token>` as a header to every API request.
All the DevRev APIs require a token to authenticate the user. Provide `Authorization: Bearer <TOKEN>` as a header to every API request.
[How do I find my token?](https://devrev.ai/docs/apis/auth)
scheme: bearer
x-fern-bearer:
Expand Down
2 changes: 1 addition & 1 deletion fern/apis/public/openapi-public.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16021,7 +16021,7 @@ components:
auth-token:
type: http
description: |-
All the DevRev APIs require a token to authenticate the user. Provide `Authorization: <token>` as a header to every API request.
All the DevRev APIs require a token to authenticate the user. Provide `Authorization: Bearer <TOKEN>` as a header to every API request.
[How do I find my token?](https://devrev.ai/docs/apis/auth)
scheme: bearer
x-fern-bearer:
Expand Down
26 changes: 13 additions & 13 deletions fern/docs/pages/create-accounts.mdx
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [EkLine]

Where possible, do not structure sentences in future tense. Use present tense instead. (EK00005)

In this tutorial, you'll learn how to create an account and contacts associated with it in DevRev via `accounts-create` and `rev-users.create` API. You can also [create accounts manually in DevRev app](https://docs.devrev.ai/product/customers#add-new-customers).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [EkLine]

Suggestions:

  • Where possible, do not structure sentences in future tense. Use present tense instead. (EK00005)
  • Consider using 'workspace' instead of 'rev org'. (EK25033)
  • Avoid using 'we' as it can come off as patronizing. For example, write 'The configuration is complete' rather than 'We are now done with the configuration.' (EK81039)

The `rev-users.create` API is used to create [contacts](https://docs.devrev.ai/product/grow#-contact) which represents an individual user associated with the account of the organization. To create a contact, we also need to use the `rev-orgs.list` API with the `accounts` filter to get the default [workspace](https://docs.devrev.ai/product/grow#-workspace)(rev org) created with the account. We will be creating a contact under the workspace (`rev_org`) of the account as contacts (`rev_user`) cannot exist individually without being associated with a workspace.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [EkLine]

Where possible, do not structure sentences in future tense. Use present tense instead. (EK00005)

You have now successfully created a contact for the account. You can check the contacts created on the DevRev app by going to **Customers** > **Contacts** or by clicking the account you created in **Accounts** and selecting the **Contacts** tab to view all the contacts created for the selected account.

Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ flowchart TD
acct-create[accounts.create]
exist(((Account is existing
'account ID')))
list[rev-orgs.list with
list[rev-orgs.list with
'account' filter]
get[rev-orgs.get with
'account ID']
Expand Down Expand Up @@ -52,7 +52,7 @@ The payload to make a request is given below:
curl --location 'https://api.devrev.ai/accounts.create' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: <PAT>' \
--header 'Authorization: Bearer <PAT>' \
--data '{
"display_name": "John Doe"
}'
Expand Down Expand Up @@ -126,9 +126,9 @@ The payload to make a request is given below:
}
```

The response contains `"external_ref": "don:identity:dvrv-us-1:devo/<devo-id>:account/<acc-id>",`. The `external_ref` identifies the `devo` ID (Dev organization ID) as `devo/<devo-id>` and the `account` ID as `account/<acc-id>`.
The response contains `"external_ref": "don:identity:dvrv-us-1:devo/<devo-id>:account/<acc-id>",`. The `external_ref` identifies the `devo` ID (Dev organization ID) as `devo/<devo-id>` and the `account` ID as `account/<acc-id>`.

1. Check **Customers > Accounts** in the DevRev app to confirm that that account was created.
1. Check **Customers > Accounts** in the DevRev app to confirm that the account was created.

![account](../img/account.png)

Expand All @@ -139,19 +139,19 @@ To create a contact associated with the account you created, follow the steps li
Get the default rev org created along with the newly created account using the `rev-orgs.list` API:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [EkLine]

Consider using 'workspace' instead of 'rev org'. (EK25033)

Suggested change
Get the default rev org created along with the newly created account using the `rev-orgs.list` API:
Get the default workspace created along with the newly created account using the `rev-orgs.list` API:


1. Make a GET/POST request to "https://api.devrev.ai/rev-orgs.list" using cURL with the `account` filter. Use the `external_ref` from the previous response as an `account` filter.

```bash
curl -X POST https://api.devrev.ai/rev-orgs.list \
-H "Authorization: <apiKey>" \
-H "Authorization: Bearer <apiKey>" \
-H "Content-Type: application/json" \
-d '{"account": [
"<external reference of the account>"
]
}'
```

It returns the following response:

```json focus={19}
{
"rev_orgs": [
Expand Down Expand Up @@ -189,26 +189,26 @@ Get the default rev org created along with the newly created account using the `
]
}
```

Note the `display_id` (example: `REV-abcd`) of the rev org from the response.

- If there is an existing account then you can get the default rev org using the `rev-orgs.get` API:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [EkLine]

Consider using 'workspace' instead of 'rev org'. (EK25033)

Suggested change
- If there is an existing account then you can get the default rev org using the `rev-orgs.get` API:
- If there is an existing account then you can get the default workspace using the `rev-orgs.get` API:


- Make a GET request to "https://api.devrev.ai/rev-orgs.get" using cURL with the `account` filter.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [EkLine]

Consider using 'customer' instead of 'rev'. (EK25033)

Suggested change
- Make a GET request to "https://api.devrev.ai/rev-orgs.get" using cURL with the `account` filter.
- Make a GET request to "https://api.devrev.ai/rev-orgs.get" using cURL with the `customer` filter.


```bash
curl -G https://api.devrev.ai/rev-orgs.get \
-H "Authorization: <apiKey>" \
-H "Authorization: Bearer <apiKey>" \
-d account=ACC-12345 \
```

2. Make a POST request to "https://api.devrev.ai/rev-users.create" to create a rev-user.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [EkLine]

Suggestions:

  • Consider using 'customer' instead of 'rev'. (EK25033)
  • Consider using 'customer' instead of 'rev-user'. (EK25033)

Suggested change
2. Make a POST request to "https://api.devrev.ai/rev-users.create" to create a rev-user.
2. Make a POST request to "https://api.devrev.ai/rev-users.create" to create a customer.


In the request, set `rev_org` to the value of the `display_id` from the previous reponse.

```bash
curl -X POST https://api.devrev.ai/rev-users.create \
-H "Authorization: <apiKey>" \
-H "Authorization: Bearer <apiKey>" \
-H "Content-Type: application/json" \
-d '{
"rev_org": "<rev org display-id>"
Expand Down
17 changes: 8 additions & 9 deletions fern/docs/pages/custom-objects.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ All DevRev objects require a schema. First, create a schema for the "Campaign" c
curl --location 'https://api.devrev.ai/schemas.custom.set' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: <TOKEN>' \
--header 'Authorization: Bearer <TOKEN>' \
--data '{
"type": "tenant_fragment",
"description": "Attributes for Campaign",
Expand Down Expand Up @@ -79,7 +79,7 @@ Once the schema is created, you can create a custom object of type "Campaign":
curl --location 'https://api.devrev.ai/custom-objects.create' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: <TOKEN>' \
--header 'Authorization: Bearer <TOKEN>' \
--data '{
"leaf_type": "campaign",
"unique_key": "CAMP-001",
Expand Down Expand Up @@ -135,7 +135,7 @@ To get a custom object, use the `custom-objects.get` endpoint:
curl --location 'https://api.devrev.ai/custom-objects.get' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: <TOKEN>' \
--header 'Authorization: Bearer <TOKEN>' \
--data '{
"id": "don:core:dvrv-us-1:devo/demo:custom_object/campaign/1"
}'
Expand All @@ -149,7 +149,7 @@ To list custom objects, use the `custom-objects.list` endpoint:
curl --location 'https://api.devrev.ai/custom-objects.list' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: <TOKEN>' \
--header 'Authorization: Bearer <TOKEN>' \
--data '{
"leaf_type": "campaign",
"filter": [
Expand All @@ -169,7 +169,7 @@ following example updates the budget of the previously created campaign custom o
curl --location 'https://api.devrev.ai/custom-objects.update' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: <TOKEN>' \
--header 'Authorization: Bearer <TOKEN>' \
--data '{
"id": "don:core:dvrv-us-1:devo/demo:custom_object/campaign/1",
"custom_fields": {
Expand All @@ -187,7 +187,7 @@ The following example deletes the previously created campaign custom object:
curl --location 'https://api.devrev.ai/custom-objects.delete' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: <TOKEN>' \
--header 'Authorization: Bearer <TOKEN>' \
--data '{
"id": "don:core:dvrv-us-1:devo/demo:custom_object/campaign/1"
}'
Expand All @@ -204,7 +204,7 @@ in the account tenant schema.
curl --location 'https://api.devrev.ai/schemas.custom.set' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: <TOKEN>' \
--header 'Authorization: Bearer <TOKEN>' \
--data '{
"type": "tenant_fragment",
"description": "Tenant attributes for Account",
Expand Down Expand Up @@ -234,7 +234,7 @@ campaign custom object with subtype "social_media", you can do so as follows:
curl --location 'https://api.devrev.ai/custom-objects.create' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: <TOKEN>' \
--header 'Authorization: Bearer <TOKEN>' \
--data '{
"leaf_type": "campaign",
"custom_schema_spec": {
Expand All @@ -253,4 +253,3 @@ curl --location 'https://api.devrev.ai/custom-objects.create' \
"unique_key": "CAMP-001"
}'
```

26 changes: 13 additions & 13 deletions fern/docs/pages/customization.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Make sure to replace `<TOKEN>` with your API token.
```curl
curl --location 'https://api.devrev.ai/schemas.custom.set' \
--header 'Content-Type: application/json' \
--header 'Authorization: <TOKEN>' \
--header 'Authorization: Bearer <TOKEN>' \
--data '{
"type": "custom_type_fragment",
"description": "Attributes for tracking a bug",
Expand Down Expand Up @@ -105,7 +105,7 @@ _bug_-flavored _issue_ object to track it and assigns a relevant owner.
```curl {11-17}
curl --location 'https://api.devrev.ai/works.create' \
--header 'Content-Type: application/json' \
--header 'Authorization: <TOKEN>' \
--header 'Authorization: Bearer <TOKEN>' \
--data '{
"type": "issue",
"title": "API failure in Prod",
Expand Down Expand Up @@ -138,7 +138,7 @@ a subtype-specific field.
```curl
curl --location 'https://api.devrev.ai/schemas.custom.set' \
--header 'Content-Type: application/json' \
--header 'Authorization: <TOKEN>' \
--header 'Authorization: Bearer <TOKEN>' \
--data '{
"type": "tenant_fragment",
"description": "Tenant attributes for issues",
Expand All @@ -160,7 +160,7 @@ Populate the release notes in the issue object created above:
```curl {8-13}
curl --location 'https://api.devrev.ai/works.update' \
--header 'Content-Type: application/json' \
--header 'Authorization: <TOKEN>' \
--header 'Authorization: Bearer <TOKEN>' \
--data '{
"id": "don:core:dvrv-us-1:devo/test:issue/1",
"type": "issue",
Expand Down Expand Up @@ -239,7 +239,7 @@ to `true` and _impacted_environments_ containing `"Prod"`.
```curl
curl --location 'https://api.devrev.ai/works.list' \
--header 'Content-Type: application/json' \
--header 'Authorization: <TOKEN>' \
--header 'Authorization: Bearer <TOKEN>' \
--data '{
"type": [ "issue" ],
"issue": {
Expand Down Expand Up @@ -275,7 +275,7 @@ and delete the _regression_ field.
```curl {28-36}
curl --location 'https://api.devrev.ai/schemas.custom.set' \
--header 'Content-Type: application/json' \
--header 'Authorization: <TOKEN>' \
--header 'Authorization: Bearer <TOKEN>' \
--data '{
"type": "custom_type_fragment",
"description": "Attributes for tracking a bug",
Expand Down Expand Up @@ -359,7 +359,7 @@ _regression_ field is dropped in the response.
```curl {16-18, 21}
curl --location 'https://api.devrev.ai/works.get' \
--header 'Content-Type: application/json' \
--header 'Authorization: <TOKEN>' \
--header 'Authorization: Bearer <TOKEN>' \
--data '{
"id": "don:core:dvrv-us-1:devo/test:issue/2"
}'
Expand Down Expand Up @@ -414,7 +414,7 @@ organization:
```curl
curl --location 'https://api.devrev.ai/schemas.custom.list' \
--header 'Content-Type: application/json' \
--header 'Authorization: <TOKEN>'
--header 'Authorization: Bearer <TOKEN>'
```

Deprecated fragments aren't listed in the response.
Expand Down Expand Up @@ -458,7 +458,7 @@ fragment with the following payload:
```curl
curl --location 'https://api.devrev.ai/internal/schemas.custom.set' \
--header 'Content-Type: application/json' \
--header 'Authorization: <TOKEN>' \
--header 'Authorization: Bearer <TOKEN>' \
--data '{
"type": "tenant_fragment",
"leaf_type": "issue",
Expand Down Expand Up @@ -540,7 +540,7 @@ You want to add a new stage _Needs RCA_ to the _bug_ subtype.
```curl
curl --location 'https://api.devrev.ai/stages.custom.create' \
--header 'Content-Type: application/json' \
--header 'Authorization: <TOKEN>' \
--header 'Authorization: Bearer <TOKEN>' \
--data '{
"name": "Needs RCA",
"state": "closed",
Expand Down Expand Up @@ -581,7 +581,7 @@ backl --> dev --> rca --> compl
```curl {11}
curl --location 'https://api.devrev.ai/stage-diagrams.create' \
--header 'Content-Type: application/json' \
--header 'Authorization: <TOKEN>' \
--header 'Authorization: Bearer <TOKEN>' \
--data '{
"leaf_type": "issue",
"subtype": "bug",
Expand Down Expand Up @@ -629,7 +629,7 @@ The stage diagram created above can be referenced in the _bug_ subtype as follow
```curl {9}
curl --location 'https://api.devrev.ai/schemas.custom.set' \
--header 'Content-Type: application/json' \
--header 'Authorization: <TOKEN>' \
--header 'Authorization: Bearer <TOKEN>' \
--data '{
"type": "custom_type_fragment",
"leaf_type": "issue",
Expand All @@ -654,7 +654,7 @@ _completed_ stage by adding a dependent field constraint.
```curl {12-22}
curl --location 'https://api.devrev.ai/schemas.custom.set' \
--header 'Content-Type: application/json' \
--header 'Authorization: <TOKEN>' \
--header 'Authorization: Bearer <TOKEN>' \
--data '{
"type": "custom_type_fragment",
"leaf_type": "issue",
Expand Down
12 changes: 6 additions & 6 deletions fern/docs/pages/interact-agent.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ The DevRev async API enables you to execute agents without any execution timeout
- Ability to handle long-running agent tasks.

<Callout type="note">
In any unlikely and unforeseen circumstances, if an individual operation of the workflow times out, you do not receive an error event right now to notify that you should not wait for any more messages. It is better to have a client side timeout for now while the issue is brainstormed and fixed for you.
In any unlikely and unforeseen circumstances, if an individual operation of the workflow times out, you do not receive an error event right now to notify that you should not wait for any more messages. It is better to have a client side timeout for now while the issue is brainstormed and fixed for you.
</Callout>

## Set up webhook
Expand All @@ -18,7 +18,7 @@ Before using the async API, you need to create a webhook to receive agent execut
```bash
curl --location 'https://api.devrev.ai/internal/webhooks.create' \
--header 'Content-Type: application/json' \
--header 'Authorization: <YOUR_API_TOKEN>' \
--header 'Authorization: Bearer <YOUR_API_TOKEN>' \
--data '{
"url": "https://your-application.com/webhook-endpoint",
"event_types": ["ai_agent_response"],
Expand Down Expand Up @@ -86,7 +86,7 @@ You should follow the documentation provided for webhooks [here](https://develop
curl --location 'https://api.devrev.ai/internal/ai-agents.events.execute-async' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: <YOUR_API_KEY>' \
--header 'Authorization: Bearer <YOUR_API_KEY>' \
--data '{
"agent": "don:core:dvrv-us-1:devo/0:ai_agent/1",
"event": {
Expand Down Expand Up @@ -131,7 +131,7 @@ You should follow the documentation provided for webhooks [here](https://develop
}
})
});

return await response.json();
};
```
Expand Down Expand Up @@ -276,7 +276,7 @@ function handleUserMessage(message) {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: "YOUR_API_KEY",
Authorization: Bearer "YOUR_API_KEY",
},
body: JSON.stringify({
agent: "your_agent_id",
Expand Down Expand Up @@ -342,7 +342,7 @@ If you're using DevRev workflows:
Agent node.
</Callout>

1. Add the "Talk To Agent" node to your workflow
1. Add the "Talk To Agent" node to your workflow
2. Configure it with your agent ID
3. Connect it to response nodes to process the agent's output
4. The async API is used automatically by the workflow engine
Expand Down
12 changes: 6 additions & 6 deletions fern/docs/pages/timeline-entries.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ You can use this to send any information about a customer like their last logged

To send a restricted visibility message, follow the steps listed below:

The payload to make a request would look like given below:
The payload to make a request would look like given below:

<CodeBlock title="Payload">
```json {4-6}
Expand All @@ -20,12 +20,12 @@ The payload to make a request would look like given below:
"private_to": [<list of user IDs>],
"type": "timeline_comment"
}
```
```
</CodeBlock>

* `object` must be of type string and contains `<partition>`, `<dev-org-id>`, and `<object-id>`.
* `body` is of type string and contains the actual message to be posted.
* `visibility` is set to `private` in order for the message to be visible only to users, `internal` is visible with the Dev organization, `external` is visible to the Dev organzation and customers, and `public` is visible to all.
* `visibility` is set to `private` in order for the message to be visible only to users, `internal` is visible with the Dev organization, `external` is visible to the Dev organzation and customers, and `public` is visible to all.
* `type` should be `timeline_comment`.

1. Get the [object ID](/api-reference/getting-started) and object type where you want to send a message.
Expand All @@ -44,15 +44,15 @@ In this example, you are using curl to make the requests but you can use any too

<CodeBlock title="Request">
```bash
curl -X POST -H "Content-Type: application/json" -d
curl -X POST -H "Content-Type: application/json" -d
'{
"object": "don:core:<partition>:devo/<dev-org-id>:<object-type>/<object-id>",
"body": "message",
"visibility": "private",
"type": "timeline_comment"
}'
}'
'https://api.devrev.ai/timeline-entries.create' \
--header 'Authorization: <PAT>'
--header 'Authorization: Bearer <PAT>'
```
</CodeBlock>

Expand Down
Loading
Loading