# Checkout Article

## Overview
This API allows a user to check out an article.
This creates a new version of the article in the requested knowledge base language, in a
checked-out state, and locks it to the requesting user. Only the user who holds the
lock can edit the article through the
[Edit Article](../apis/v4/knowledge/contentmgr/api-bundled/articles/editarticle) API. 
This API is not for suggestions.
## Permissions
The user must have either the `Author` or `Knowledge Base Manager` role, or a custom role
with `Edit Article` action. Additionally:
* The user must have
`Edit Article`
 permission on the parent folder.
* If the article is not in the
`draft`
 or
`published`
 stage (in the article review workflow),

the user must be a contributor of the current article stage.

## Preconditions
* The latest version of the article in the language specified by
`$lang`
 must not

already have been checked out (locked). Only one user may hold the lock for an article

at a time.

Endpoint: PUT /articles/{articleIDs}/checkout
Security: oAuthUser, oAuthOnBehalfOfUser

## Description:

  - `Overview` ()
    This API allows a user to check out an article.
This creates a new version of the article in the requested knowledge base language, in a
checked-out state, and locks it to the requesting user. Only the user who holds the
lock can edit the article through the
[Edit Article](../apis/v4/knowledge/contentmgr/api-bundled/articles/editarticle) API. This API is not for suggestions.

  - `Permissions` ()
    The user must have either the `Author` or `Knowledge Base Manager` role, or a custom role
with `Edit Article` action. Additionally: * The user must have
`Edit Article`
 permission on the parent folder.
* If the article is not in the
`draft`
 or
`published`
 stage (in the article review workflow),

the user must be a contributor of the current article stage.

  - `Preconditions` ()
    * The latest version of the article in the language specified by
`$lang`
 must not

already have been checked out (locked). Only one user may hold the lock for an article

at a time.

## Security:

  - `oAuthUser` (unknown)
    oauth2 scopes: https://api.egain.cloud/auth/knowledge.contentmgr.manage

  - `oAuthOnBehalfOfUser` (unknown)
    oauth2 scopes: https://api.egain.cloud/auth/knowledge.contentmgr.onbehalfof.manage

## Path parameters:

  - `articleIDs` (string, required)
    The ID of a single Article.An Article ID is composed of a 2-4 letter prefix followed by a dash and 4-15 digits.

## Query parameters:

  - `$lang` (string, required)
    The knowledge base language in which the new version is being checked out. Must be one of the enabled Knowledge Base languages.

## Header parameters:

  - `Accept-Language` (string, required)
    The Language locale accepted by the client (used for locale specific fields in resource representation and in error responses).

## Response 204:

  - `204` (unknown)
    No Content

## Response 204 headers:

  - `ETag` (string)
    UTC ISO-8601 timestamp identifying the resource version for use with the `If-Match` header on subsequent updates.
    Example: 2026-04-15T09:00:00.000Z

## Response 400:

  - `400` (unknown)
    Bad Request

## Response 400 fields (application/json):

  - `code` (string, required)
    A string that follows the pattern *{integer}-{integer}*.
The first *{integer}* is the http status code.  This code as a whole is unique.
* For example, error codes "400-101" and "404-101" are distinctly different.

  - `developerMessage` (string, required)
    A summary of the error.

  - `details` (array)

  - `details.key` (string, required)

  - `details.value` (string)

  - `userMessage` (string)
    UI friendly messages are only supported by some APIs.
* The client must explicitly request UI friendly messages by passing the
*X-egain-error-message=yes*
 header.

## Response 401:

  - `401` (unknown)
    Unauthorized

## Response 401 fields (application/json):

  - `code` (string, required)
    A string that follows the pattern *{integer}-{integer}*.
The first *{integer}* is the http status code.  This code as a whole is unique.
* For example, error codes "400-101" and "404-101" are distinctly different.

  - `developerMessage` (string, required)
    A summary of the error.

  - `details` (array)

  - `details.key` (string, required)

  - `details.value` (string)

  - `userMessage` (string)
    UI friendly messages are only supported by some APIs.
* The client must explicitly request UI friendly messages by passing the
*X-egain-error-message=yes*
 header.

## Response 403:

  - `403` (unknown)
    Forbidden

## Response 403 fields (application/json):

  - `code` (string, required)
    A string that follows the pattern *{integer}-{integer}*.
The first *{integer}* is the http status code.  This code as a whole is unique.
* For example, error codes "400-101" and "404-101" are distinctly different.

  - `developerMessage` (string, required)
    A summary of the error.

  - `details` (array)

  - `details.key` (string, required)

  - `details.value` (string)

  - `userMessage` (string)
    UI friendly messages are only supported by some APIs.
* The client must explicitly request UI friendly messages by passing the
*X-egain-error-message=yes*
 header.

## Response 404:

  - `404` (unknown)
    Not Found

## Response 404 fields (application/json):

  - `code` (string, required)
    A string that follows the pattern *{integer}-{integer}*.
The first *{integer}* is the http status code.  This code as a whole is unique.
* For example, error codes "400-101" and "404-101" are distinctly different.

  - `developerMessage` (string, required)
    A summary of the error.

  - `details` (array)

  - `details.key` (string, required)

  - `details.value` (string)

  - `userMessage` (string)
    UI friendly messages are only supported by some APIs.
* The client must explicitly request UI friendly messages by passing the
*X-egain-error-message=yes*
 header.

## Response 406:

  - `406` (unknown)
    Not acceptable

## Response 406 fields (application/json):

  - `code` (string, required)
    A string that follows the pattern *{integer}-{integer}*.
The first *{integer}* is the http status code.  This code as a whole is unique.
* For example, error codes "400-101" and "404-101" are distinctly different.

  - `developerMessage` (string, required)
    A summary of the error.

  - `details` (array)

  - `details.key` (string, required)

  - `details.value` (string)

  - `userMessage` (string)
    UI friendly messages are only supported by some APIs.
* The client must explicitly request UI friendly messages by passing the
*X-egain-error-message=yes*
 header.

## Response 409:

  - `409` (unknown)
    Conflict. The article is already checked out (locked) by a **different** user. 
This is not returned when the requesting user already holds the lock: in that case
the operation is idempotent and succeeds with `204 No Content` without changing the
article's state.

## Response 409 fields (application/json):

  - `code` (string, required)
    A string that follows the pattern *{integer}-{integer}*.
The first *{integer}* is the http status code.  This code as a whole is unique.
* For example, error codes "400-101" and "404-101" are distinctly different.

  - `developerMessage` (string, required)
    A summary of the error.

  - `details` (array)

  - `details.key` (string, required)

  - `details.value` (string)

  - `userMessage` (string)
    UI friendly messages are only supported by some APIs.
* The client must explicitly request UI friendly messages by passing the
*X-egain-error-message=yes*
 header.

## Response 429:

  - `429` (unknown)
    Too Many Request

## Response 429 fields (application/json):

  - `code` (string, required)
    A string that follows the pattern *{integer}-{integer}*.
The first *{integer}* is the http status code.  This code as a whole is unique.
* For example, error codes "400-101" and "404-101" are distinctly different.

  - `developerMessage` (string, required)
    A summary of the error.

  - `details` (array)

  - `details.key` (string, required)

  - `details.value` (string)

  - `userMessage` (string)
    UI friendly messages are only supported by some APIs.
* The client must explicitly request UI friendly messages by passing the
*X-egain-error-message=yes*
 header.

## Response 500:

  - `500` (unknown)
    Internal server error

## Response 500 fields (application/json):

  - `code` (string, required)
    A string that follows the pattern *{integer}-{integer}*.
The first *{integer}* is the http status code.  This code as a whole is unique.
* For example, error codes "400-101" and "404-101" are distinctly different.

  - `developerMessage` (string, required)
    A summary of the error.

  - `details` (array)

  - `details.key` (string, required)

  - `details.value` (string)

  - `userMessage` (string)
    UI friendly messages are only supported by some APIs.
* The client must explicitly request UI friendly messages by passing the
*X-egain-error-message=yes*
 header.

## Response 400 examples:

  - `Required Attribute missing` (unknown)
    Required query parameter is missing

  - `Unallowed attribute value` (unknown)
    One of the attribute has value which is not allowed

## Response 401 examples:

  - `Invalid Authorization` (unknown)
    Invalid or expired Authorization. Generate new Authorization header and try again.

## Response 403 examples:

  - `Required Scope Missing` (unknown)
    User doesn't have required scope to call this API. Refer API description to know which scope needs to be assigned to user.

## Response 404 examples:

  - `Resource Not Found` (unknown)
    Resource not found

## Response 406 examples:

  - `Not Acceptable` (unknown)

## Response 409 examples:

  - `article already checked out` (unknown)
    The article is already checked out (locked) by another user

## Response 429 examples:

  - `Too Many Request` (unknown)
    Too many requests. Try again at a later time.

## Response 500 examples:

  - `Internal Server Error` (unknown)

