> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.aventure.vc/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.aventure.vc/_mcp/server.

# Authorize API operations

POST https://api.aventure.vc/v1/auth/me/permissions
Content-Type: application/json

Returns the supplied generated API operations that the current caller may call, alongside its existing permission grant and access class. Candidate operations are checked without being executed.

Reference: https://docs.aventure.vc/api-reference/auth-session/authorize-operations

## Authentication

- `Authorization` header (bearer token, required) — User bearer token: Clerk session JWT, Clerk OAuth access token, or Clerk personal API key
- `X-API-Key` header (required) — Admin API key for system-to-system write operations
- `X-Client-Secret` header (required) — Client secret for read-only service-to-service access (no writes)

## Request

### Body (application/json)

- `operation` (list of object, required) — Generated API operation candidates to authorize.
  - `authorizationPath` (string, required) — Concrete path for authorization. Preserve the path template's literal segments and substitute its parameters with values matching their generated schema. No request is executed against this path.
  - `method` (enum, required) — HTTP method of the operation.
    - Allowed values: `GET`, `POST`, `PUT`, `PATCH`, `DELETE`
  - `operationId` (string, required) — Generated OpenAPI operation id.
  - `path` (string, required) — Absolute API path. A whole path segment may be an OpenAPI placeholder such as \{entityId}.

## Response

### 200

OK

- `operation` (list of object, required) — Supplied operations admitted by the current session.
  - `authorizationPath` (string, required) — Concrete path for authorization. Preserve the path template's literal segments and substitute its parameters with values matching their generated schema. No request is executed against this path.
  - `method` (enum, required) — HTTP method of the operation.
    - Allowed values: `GET`, `POST`, `PUT`, `PATCH`, `DELETE`
  - `operationId` (string, required) — Generated OpenAPI operation id.
  - `path` (string, required) — Absolute API path. A whole path segment may be an OpenAPI placeholder such as \{entityId}.
- `operationAccess` (enum, required) — Highest access class represented by the current session.
  - Allowed values: `READ`, `PERMISSION`, `ADMIN`
- `permissionGrant` (object, required) — Existing role and permission grant for the current session.
  - `permission` (list of string, required)
  - `role` (list of string, required)

## Examples

**Request**

```json
{
  "operation": [
    {
      "authorizationPath": "string",
      "method": "GET",
      "operationId": "string",
      "path": "string"
    }
  ]
}
```

**Response**

```json
{
  "operation": [
    {
      "authorizationPath": "string",
      "method": "GET",
      "operationId": "string",
      "path": "string"
    }
  ],
  "operationAccess": "READ",
  "permissionGrant": {
    "permission": [
      "string"
    ],
    "role": [
      "string"
    ]
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.aventure.vc/v1/auth/me/permissions"

payload = { "operation": [
        {
            "authorizationPath": "string",
            "method": "GET",
            "operationId": "string",
            "path": "string"
        }
    ] }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.aventure.vc/v1/auth/me/permissions';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"operation":[{"authorizationPath":"string","method":"GET","operationId":"string","path":"string"}]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.aventure.vc/v1/auth/me/permissions"

	payload := strings.NewReader("{\n  \"operation\": [\n    {\n      \"authorizationPath\": \"string\",\n      \"method\": \"GET\",\n      \"operationId\": \"string\",\n      \"path\": \"string\"\n    }\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.aventure.vc/v1/auth/me/permissions")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"operation\": [\n    {\n      \"authorizationPath\": \"string\",\n      \"method\": \"GET\",\n      \"operationId\": \"string\",\n      \"path\": \"string\"\n    }\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.aventure.vc/v1/auth/me/permissions")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"operation\": [\n    {\n      \"authorizationPath\": \"string\",\n      \"method\": \"GET\",\n      \"operationId\": \"string\",\n      \"path\": \"string\"\n    }\n  ]\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.aventure.vc/v1/auth/me/permissions', [
  'body' => '{
  "operation": [
    {
      "authorizationPath": "string",
      "method": "GET",
      "operationId": "string",
      "path": "string"
    }
  ]
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.aventure.vc/v1/auth/me/permissions");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"operation\": [\n    {\n      \"authorizationPath\": \"string\",\n      \"method\": \"GET\",\n      \"operationId\": \"string\",\n      \"path\": \"string\"\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["operation": [
    [
      "authorizationPath": "string",
      "method": "GET",
      "operationId": "string",
      "path": "string"
    ]
  ]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.aventure.vc/v1/auth/me/permissions")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```