# Account Credits

GET https://api.apexverify.com/v1/account/credits

Retrieve the current credit balance for the account.

Reference: https://documentation.apexverify.com/api-reference/apex-verify-api/account/get-credits-v-1-account-credits-get

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: openapi
  version: 1.0.0
paths:
  /v1/account/credits:
    get:
      operationId: get-credits-v-1-account-credits-get
      summary: Account Credits
      description: Retrieve the current credit balance for the account.
      tags:
        - subpackage_account
      parameters:
        - name: X-API-Key
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountCreditResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ForbiddenResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
servers:
  - url: https://api.apexverify.com
components:
  schemas:
    AccountCreditResponse:
      type: object
      properties:
        email_credit:
          type: number
          format: double
        phone_credit:
          type: number
          format: double
      required:
        - email_credit
        - phone_credit
      title: AccountCreditResponse
    BadRequestResponse:
      type: object
      properties:
        message:
          type: string
          default: Bad Request
      title: BadRequestResponse
    UnauthorizedResponse:
      type: object
      properties:
        message:
          type: string
          default: Unauthorized
      title: UnauthorizedResponse
    ForbiddenResponse:
      type: object
      properties:
        message:
          type: string
          default: Forbidden
      title: ForbiddenResponse
    NotFoundResponse:
      type: object
      properties:
        message:
          type: string
          default: Not Found
      title: NotFoundResponse
    TooManyRequestsResponse:
      type: object
      properties:
        message:
          type: string
          default: Too Many Requests
      title: TooManyRequestsResponse
    InternalServerErrorResponse:
      type: object
      properties:
        message:
          type: string
          default: >-
            Internal Server Error. Please contact support at
            contact@apexverify.com...
      title: InternalServerErrorResponse
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

```

## SDK Code Examples

```python
import requests

url = "https://api.apexverify.com/v1/account/credits"

headers = {"X-API-Key": "<apiKey>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.apexverify.com/v1/account/credits';
const options = {method: 'GET', headers: {'X-API-Key': '<apiKey>'}};

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"
	"net/http"
	"io"
)

func main() {

	url := "https://api.apexverify.com/v1/account/credits"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("X-API-Key", "<apiKey>")

	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.apexverify.com/v1/account/credits")

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

request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<apiKey>'

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.get("https://api.apexverify.com/v1/account/credits")
  .header("X-API-Key", "<apiKey>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.apexverify.com/v1/account/credits', [
  'headers' => [
    'X-API-Key' => '<apiKey>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.apexverify.com/v1/account/credits");
var request = new RestRequest(Method.GET);
request.AddHeader("X-API-Key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["X-API-Key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.apexverify.com/v1/account/credits")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

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()
```