public function postKey($type, $fileKey): int
    {
        if (!in_array($type, self::$type, true)) {
            throw new \InvalidArgumentException('Invalid type parameter');
        }

        $options = ['json' => ['fileKey' => $fileKey]];

        /** @var JsonStream $stream */
        $stream = $this->client
            ->post(UserApi::generateUrl("csv/{$type}.json"), $options)
            ->getBody();

        return $stream->jsonSerialize()['id'];
    }