# Authentication

## POST /public/v2/Ping

> Check service availability

```json
{"openapi":"3.0.1","info":{"title":"Bitpool API v2","version":"v2"},"servers":[{"url":"https://api.bitpool.com","description":"Production API"},{"url":"https://api.dev.bitpool.com","description":"Development API"}],"security":[{"Bitpool2":["readAccess","writeAccess"]}],"components":{"securitySchemes":{"Bitpool2":{"type":"apiKey","name":"Authorization","in":"header"}}},"paths":{"/public/v2/Ping":{"post":{"tags":["Authentication"],"summary":"Check service availability","parameters":[{"name":"BPDateFormat","in":"header","description":"Date format header","required":true,"schema":{"type":"string","default":"ISO"}},{"name":"Accept","in":"header","description":"Accept header","required":true,"schema":{"type":"string","default":"application/json"}}],"requestBody":{"description":"A test value to echo back","content":{"application/json":{"schema":{"type":"string"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"string"}}}}}}}}}
```

## GET /public/v2/IsAuth

> Returns true when the current HTTP request is authenticated.> \
> Use this endpoint to verify client authentication state.

```json
{"openapi":"3.0.1","info":{"title":"Bitpool API v2","version":"v2"},"servers":[{"url":"https://api.bitpool.com","description":"Production API"},{"url":"https://api.dev.bitpool.com","description":"Development API"}],"security":[{"Bitpool2":["readAccess","writeAccess"]}],"components":{"securitySchemes":{"Bitpool2":{"type":"apiKey","name":"Authorization","in":"header"}}},"paths":{"/public/v2/IsAuth":{"get":{"tags":["Authentication"],"summary":"Returns true when the current HTTP request is authenticated.\r\nUse this endpoint to verify client authentication state.","parameters":[{"name":"BPDateFormat","in":"header","description":"Date format header","required":true,"schema":{"type":"string","default":"ISO"}},{"name":"Accept","in":"header","description":"Accept header","required":true,"schema":{"type":"string","default":"application/json"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"boolean"}}}}}}}}}
```

## POST /public/v2/Login

> Create login request which returns an authentication token

```json
{"openapi":"3.0.1","info":{"title":"Bitpool API v2","version":"v2"},"servers":[{"url":"https://api.bitpool.com","description":"Production API"},{"url":"https://api.dev.bitpool.com","description":"Development API"}],"security":[{"Bitpool2":["readAccess","writeAccess"]}],"components":{"securitySchemes":{"Bitpool2":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"BitPool.Base.DTO.AUTH_Login2":{"type":"object","properties":{"Username":{"type":"string","nullable":true},"Password":{"type":"string","nullable":true},"Organisation":{"type":"string","nullable":true},"Place":{"type":"string","nullable":true}},"additionalProperties":false}}},"paths":{"/public/v2/Login":{"post":{"tags":["Authentication"],"summary":"Create login request which returns an authentication token","parameters":[{"name":"code2fa","in":"query","description":"","schema":{"type":"string"}},{"name":"BPDateFormat","in":"header","description":"Date format header","required":true,"schema":{"type":"string","default":"ISO"}},{"name":"Accept","in":"header","description":"Accept header","required":true,"schema":{"type":"string","default":"application/json"}}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BitPool.Base.DTO.AUTH_Login2"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"string"}}}}}}}}}
```

## POST /public/v2/Login2

> Create login request which returns an authentication token and information about organisation

```json
{"openapi":"3.0.1","info":{"title":"Bitpool API v2","version":"v2"},"servers":[{"url":"https://api.bitpool.com","description":"Production API"},{"url":"https://api.dev.bitpool.com","description":"Development API"}],"security":[{"Bitpool2":["readAccess","writeAccess"]}],"components":{"securitySchemes":{"Bitpool2":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"BitPool.Base.DTO.AUTH_Login2":{"type":"object","properties":{"Username":{"type":"string","nullable":true},"Password":{"type":"string","nullable":true},"Organisation":{"type":"string","nullable":true},"Place":{"type":"string","nullable":true}},"additionalProperties":false},"BitPool.WebApi.Models.LoginResult":{"type":"object","properties":{"OrganisationId":{"type":"integer","format":"int32"},"Organisation":{"type":"string","nullable":true},"Username":{"type":"string","nullable":true},"AuthKey":{"type":"string","nullable":true}},"additionalProperties":false}}},"paths":{"/public/v2/Login2":{"post":{"tags":["Authentication"],"summary":"Create login request which returns an authentication token and information about organisation","parameters":[{"name":"code2fa","in":"query","description":"","schema":{"type":"string"}},{"name":"BPDateFormat","in":"header","description":"Date format header","required":true,"schema":{"type":"string","default":"ISO"}},{"name":"Accept","in":"header","description":"Accept header","required":true,"schema":{"type":"string","default":"application/json"}}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BitPool.Base.DTO.AUTH_Login2"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BitPool.WebApi.Models.LoginResult"}}}}}}}}}
```

## GET /public/v2/AuthKeys

> Return list of authentication keys available for user

```json
{"openapi":"3.0.1","info":{"title":"Bitpool API v2","version":"v2"},"servers":[{"url":"https://api.bitpool.com","description":"Production API"},{"url":"https://api.dev.bitpool.com","description":"Development API"}],"security":[{"Bitpool2":["readAccess","writeAccess"]}],"components":{"securitySchemes":{"Bitpool2":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"BitPool.Base.DTO.AuthKeyDto":{"type":"object","properties":{"Organisation":{"type":"string","nullable":true},"Value":{"type":"string","nullable":true},"Place":{"type":"string","nullable":true},"Date":{"type":"string","format":"date-time"},"ImpersonatedBy":{"type":"string","nullable":true,"deprecated":true},"KeyType":{"$ref":"#/components/schemas/BitPool.Base.Enums.AuthKeyType"}},"additionalProperties":false},"BitPool.Base.Enums.AuthKeyType":{"enum":[0,1,2,3],"type":"integer","description":"\n\n0 = Standard\n\n1 = ApiReadWrite\n\n2 = ApiRead\n\n3 = ApiReadLimited","format":"int32"}}},"paths":{"/public/v2/AuthKeys":{"get":{"tags":["Authentication"],"summary":"Return list of authentication keys available for user","parameters":[{"name":"BPDateFormat","in":"header","description":"Date format header","required":true,"schema":{"type":"string","default":"ISO"}},{"name":"Accept","in":"header","description":"Accept header","required":true,"schema":{"type":"string","default":"application/json"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BitPool.Base.DTO.AuthKeyDto"}}}}}}}}}}
```

## POST /public/v2/AuthKeys

> Create a new authentication key with given parameters

```json
{"openapi":"3.0.1","info":{"title":"Bitpool API v2","version":"v2"},"servers":[{"url":"https://api.bitpool.com","description":"Production API"},{"url":"https://api.dev.bitpool.com","description":"Development API"}],"security":[{"Bitpool2":["readAccess","writeAccess"]}],"components":{"securitySchemes":{"Bitpool2":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"BitPool.Base.DTO.CreateAuthKeyDto":{"type":"object","properties":{"KeyType":{"$ref":"#/components/schemas/BitPool.Base.Enums.AuthKeyType"},"Place":{"type":"string","nullable":true}},"additionalProperties":false},"BitPool.Base.Enums.AuthKeyType":{"enum":[0,1,2,3],"type":"integer","description":"\n\n0 = Standard\n\n1 = ApiReadWrite\n\n2 = ApiRead\n\n3 = ApiReadLimited","format":"int32"}}},"paths":{"/public/v2/AuthKeys":{"post":{"tags":["Authentication"],"summary":"Create a new authentication key with given parameters","parameters":[{"name":"BPDateFormat","in":"header","description":"Date format header","required":true,"schema":{"type":"string","default":"ISO"}},{"name":"Accept","in":"header","description":"Accept header","required":true,"schema":{"type":"string","default":"application/json"}}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BitPool.Base.DTO.CreateAuthKeyDto"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"string"}}}}}}}}}
```

## POST /public/v2/AuthKeys/{key}

> Edit an authentication key with given parameters

```json
{"openapi":"3.0.1","info":{"title":"Bitpool API v2","version":"v2"},"servers":[{"url":"https://api.bitpool.com","description":"Production API"},{"url":"https://api.dev.bitpool.com","description":"Development API"}],"security":[{"Bitpool2":["readAccess","writeAccess"]}],"components":{"securitySchemes":{"Bitpool2":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"BitPool.Base.DTO.CreateAuthKeyDto":{"type":"object","properties":{"KeyType":{"$ref":"#/components/schemas/BitPool.Base.Enums.AuthKeyType"},"Place":{"type":"string","nullable":true}},"additionalProperties":false},"BitPool.Base.Enums.AuthKeyType":{"enum":[0,1,2,3],"type":"integer","description":"\n\n0 = Standard\n\n1 = ApiReadWrite\n\n2 = ApiRead\n\n3 = ApiReadLimited","format":"int32"}}},"paths":{"/public/v2/AuthKeys/{key}":{"post":{"tags":["Authentication"],"summary":"Edit an authentication key with given parameters","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string"}},{"name":"BPDateFormat","in":"header","description":"Date format header","required":true,"schema":{"type":"string","default":"ISO"}},{"name":"Accept","in":"header","description":"Accept header","required":true,"schema":{"type":"string","default":"application/json"}}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BitPool.Base.DTO.CreateAuthKeyDto"}}}},"responses":{"200":{"description":"Success"}}}}}}
```

## DELETE /public/v2/AuthKeys/{key}

> Delete a specific authentication key

```json
{"openapi":"3.0.1","info":{"title":"Bitpool API v2","version":"v2"},"servers":[{"url":"https://api.bitpool.com","description":"Production API"},{"url":"https://api.dev.bitpool.com","description":"Development API"}],"security":[{"Bitpool2":["readAccess","writeAccess"]}],"components":{"securitySchemes":{"Bitpool2":{"type":"apiKey","name":"Authorization","in":"header"}}},"paths":{"/public/v2/AuthKeys/{key}":{"delete":{"tags":["Authentication"],"summary":"Delete a specific authentication key","parameters":[{"name":"key","in":"path","description":"","required":true,"schema":{"type":"string"}},{"name":"BPDateFormat","in":"header","description":"Date format header","required":true,"schema":{"type":"string","default":"ISO"}},{"name":"Accept","in":"header","description":"Accept header","required":true,"schema":{"type":"string","default":"application/json"}}],"responses":{"200":{"description":"Success"}}}}}}
```

## POST /public/v2/Login/Api

> Login and create an authentication key with the given parameters. Usable for standalone clients, for example desktop uploaders.

```json
{"openapi":"3.0.1","info":{"title":"Bitpool API v2","version":"v2"},"servers":[{"url":"https://api.bitpool.com","description":"Production API"},{"url":"https://api.dev.bitpool.com","description":"Development API"}],"security":[{"Bitpool2":["readAccess","writeAccess"]}],"components":{"securitySchemes":{"Bitpool2":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"BitPool.Base.DTO.CreateAuthKeyLoginDto":{"type":"object","properties":{"KeyType":{"$ref":"#/components/schemas/BitPool.Base.Enums.AuthKeyType"},"Username":{"type":"string","nullable":true},"Password":{"type":"string","nullable":true},"Organisation":{"type":"string","nullable":true},"Place":{"type":"string","nullable":true}},"additionalProperties":false},"BitPool.Base.Enums.AuthKeyType":{"enum":[0,1,2,3],"type":"integer","description":"\n\n0 = Standard\n\n1 = ApiReadWrite\n\n2 = ApiRead\n\n3 = ApiReadLimited","format":"int32"}}},"paths":{"/public/v2/Login/Api":{"post":{"tags":["Authentication"],"summary":"Login and create an authentication key with the given parameters. Usable for standalone clients, for example desktop uploaders.","parameters":[{"name":"code2fa","in":"query","description":"","schema":{"type":"string"}},{"name":"BPDateFormat","in":"header","description":"Date format header","required":true,"schema":{"type":"string","default":"ISO"}},{"name":"Accept","in":"header","description":"Accept header","required":true,"schema":{"type":"string","default":"application/json"}}],"requestBody":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BitPool.Base.DTO.CreateAuthKeyLoginDto"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"string"}}}}}}}}}
```

## POST /public/v2/Generate2faSecret

> Generate 2fa secret

```json
{"openapi":"3.0.1","info":{"title":"Bitpool API v2","version":"v2"},"servers":[{"url":"https://api.bitpool.com","description":"Production API"},{"url":"https://api.dev.bitpool.com","description":"Development API"}],"security":[{"Bitpool2":["readAccess","writeAccess"]}],"components":{"securitySchemes":{"Bitpool2":{"type":"apiKey","name":"Authorization","in":"header"}},"schemas":{"BitPool.Base.DTO.Secret2faModel":{"type":"object","properties":{"Secret":{"type":"string","nullable":true},"SecretQR":{"type":"string","nullable":true}},"additionalProperties":false}}},"paths":{"/public/v2/Generate2faSecret":{"post":{"tags":["Authentication"],"summary":"Generate 2fa secret","parameters":[{"name":"BPDateFormat","in":"header","description":"Date format header","required":true,"schema":{"type":"string","default":"ISO"}},{"name":"Accept","in":"header","description":"Accept header","required":true,"schema":{"type":"string","default":"application/json"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"string"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BitPool.Base.DTO.Secret2faModel"}}}}}}}}}
```

## GET /public/v2/Confirm2fa

> Confirm 2fa with code

```json
{"openapi":"3.0.1","info":{"title":"Bitpool API v2","version":"v2"},"servers":[{"url":"https://api.bitpool.com","description":"Production API"},{"url":"https://api.dev.bitpool.com","description":"Development API"}],"security":[{"Bitpool2":["readAccess","writeAccess"]}],"components":{"securitySchemes":{"Bitpool2":{"type":"apiKey","name":"Authorization","in":"header"}}},"paths":{"/public/v2/Confirm2fa":{"get":{"tags":["Authentication"],"summary":"Confirm 2fa with code","parameters":[{"name":"code","in":"query","description":"","schema":{"type":"string"}},{"name":"BPDateFormat","in":"header","description":"Date format header","required":true,"schema":{"type":"string","default":"ISO"}},{"name":"Accept","in":"header","description":"Accept header","required":true,"schema":{"type":"string","default":"application/json"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"boolean"}}}}}}}}}
```

## GET /public/v2/Disable2fa

> Disable 2fa

```json
{"openapi":"3.0.1","info":{"title":"Bitpool API v2","version":"v2"},"servers":[{"url":"https://api.bitpool.com","description":"Production API"},{"url":"https://api.dev.bitpool.com","description":"Development API"}],"security":[{"Bitpool2":["readAccess","writeAccess"]}],"components":{"securitySchemes":{"Bitpool2":{"type":"apiKey","name":"Authorization","in":"header"}}},"paths":{"/public/v2/Disable2fa":{"get":{"tags":["Authentication"],"summary":"Disable 2fa","parameters":[{"name":"password","in":"query","schema":{"type":"string"}},{"name":"code","in":"query","schema":{"type":"string"}},{"name":"BPDateFormat","in":"header","description":"Date format header","required":true,"schema":{"type":"string","default":"ISO"}},{"name":"Accept","in":"header","description":"Accept header","required":true,"schema":{"type":"string","default":"application/json"}}],"responses":{"200":{"description":"Success"}}}}}}
```

## GET /public/v2/Is2faEnabled

> Is 2fa enabled

```json
{"openapi":"3.0.1","info":{"title":"Bitpool API v2","version":"v2"},"servers":[{"url":"https://api.bitpool.com","description":"Production API"},{"url":"https://api.dev.bitpool.com","description":"Development API"}],"security":[{"Bitpool2":["readAccess","writeAccess"]}],"components":{"securitySchemes":{"Bitpool2":{"type":"apiKey","name":"Authorization","in":"header"}}},"paths":{"/public/v2/Is2faEnabled":{"get":{"tags":["Authentication"],"summary":"Is 2fa enabled","parameters":[{"name":"BPDateFormat","in":"header","description":"Date format header","required":true,"schema":{"type":"string","default":"ISO"}},{"name":"Accept","in":"header","description":"Accept header","required":true,"schema":{"type":"string","default":"application/json"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"boolean"}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://wiki-cloud.bitpool.com/public-bitpool-api/authentication.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
