> This is Payabli documentation. For a complete page index, fetch https://docs.payabli.com/llms.txt — append .md to any page URL for lightweight markdown. For section-level indexes, query parameters, and other AI-optimized access methods, see https://docs.payabli.com/ai-agents.md

# Change approvers

PUT https://api-sandbox.payabli.com/api/Bill/approval/{idBill}
Content-Type: application/json

Modify the list of users the bill is sent to for approval.

Reference: https://docs.payabli.com/developers/api-reference/bill/change-bill-approvers

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: payabliApi
  version: 1.0.0
paths:
  /Bill/approval/{idBill}:
    put:
      operationId: modify-approval-bill
      summary: Change bill approvers
      description: Modify the list of users the bill is sent to for approval.
      tags:
        - subpackage_bill
      parameters:
        - name: idBill
          in: path
          description: >-
            Payabli ID for the bill. Get this ID by querying `/api/Query/bills/`
            for the entrypoint or the organization.
          required: true
          schema:
            type: integer
        - name: requestToken
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_bill:ModifyApprovalBillResponse'
        '400':
          description: Bad request/ invalid data
          content:
            application/json:
              schema:
                description: Any type
        '401':
          description: Unauthorized request.
          content:
            application/json:
              schema:
                description: Any type
        '500':
          description: Internal API Error
          content:
            application/json:
              schema:
                description: Any type
        '503':
          description: Database connection error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_:PayabliApiResponse'
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                type: string
servers:
  - url: https://api-sandbox.payabli.com/api
  - url: https://api.payabli.com/api
components:
  schemas:
    type_:IsSuccess:
      type: boolean
      description: >-
        Boolean indicating whether the operation was successful. A `true` value
        indicates success. A `false` value indicates failure.
      title: IsSuccess
    type_:ResponseText:
      type: string
      description: 'Response text for operation: ''Success'' or ''Declined''.'
      title: ResponseText
    type_bill:ModifyApprovalBillResponse:
      type: object
      properties:
        isSuccess:
          $ref: '#/components/schemas/type_:IsSuccess'
        responseText:
          $ref: '#/components/schemas/type_:ResponseText'
        responseData:
          type: integer
          description: >-
            If `isSuccess` = true, this contains the bill identifier. If
            `isSuccess` = false, this contains the reason for the error. 
      required:
        - responseText
      title: ModifyApprovalBillResponse
    type_:Responsedata:
      type: object
      additionalProperties:
        description: Any type
      description: The object containing the response data.
      title: Responsedata
    type_:PayabliApiResponse:
      type: object
      properties:
        isSuccess:
          $ref: '#/components/schemas/type_:IsSuccess'
        responseData:
          $ref: '#/components/schemas/type_:Responsedata'
        responseText:
          $ref: '#/components/schemas/type_:ResponseText'
      required:
        - responseText
      title: PayabliApiResponse
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: requestToken

```

## SDK Code Examples

```typescript
import { PayabliClient } from "@payabli/sdk-node";

async function main() {
    const client = new PayabliClient({
        apiKey: "YOUR_API_KEY_HERE",
    });
    await client.bill.modifyApprovalBill(285, [
        "string",
    ]);
}
main();

```

```python
from payabli import payabli

client = payabli(
    api_key="YOUR_API_KEY_HERE",
)

client.bill.modify_approval_bill(
    id_bill=285,
    request=[
        "string"
    ],
)

```

```java
package com.example.usage;

import io.github.payabli.api.PayabliPayabliApiClient;
import java.util.Arrays;

public class Example {
    public static void main(String[] args) {
        PayabliPayabliApiClient client = PayabliPayabliApiClient
            .builder()
            .apiKey("YOUR_API_KEY_HERE")
            .build();

        client.bill().modifyApprovalBill(
            285,
            Arrays.asList("string")
        );
    }
}
```

```ruby
require "payabli"

client = Payabli::Client.new(api_key: "YOUR_API_KEY_HERE")

client.bill.modify_approval_bill(
  id_bill: 285,
  request: ["string"]
)

```

```csharp
using PayabliPayabliApi;
using System.Threading.Tasks;
using System.Collections.Generic;

namespace Usage;

public class Example
{
    public async Task Do() {
        var client = new PayabliPayabliApiClient(
            apiKey: "YOUR_API_KEY_HERE"
        );

        await client.Bill.ModifyApprovalBillAsync(
            285,
            new List<string>(){
                "string",
            }
        );
    }

}

```

```go
package example

import (
    context "context"

    client "github.com/payabli/sdk-go/client"
    option "github.com/payabli/sdk-go/option"
)

func do() {
    client := client.NewClient(
        option.WithApiKey(
            "YOUR_API_KEY_HERE",
        ),
    )
    request := []string{
        "string",
    }
    client.Bill.ModifyApprovalBill(
        context.TODO(),
        285,
        request,
    )
}

```

```php
<?php

namespace Example;

use Payabli\PayabliClient;

$client = new PayabliClient(
    apiKey: 'YOUR_API_KEY_HERE',
);
$client->bill->modifyApprovalBill(
    285,
    [
        'string',
    ],
);

```

```swift
import Foundation

let headers = [
  "requestToken": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["string"] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api-sandbox.payabli.com/api/Bill/approval/285")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
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()
```